Skip to content

feat(v1.6.6): RPI order books, stock dual earn, CrossEx securities - #148

Merged
tiagosiebler merged 15 commits into
sieblyio:masterfrom
JJ-Cro:update19102026
Oct 21, 2026
Merged

tiagosiebler merged 15 commits into
sieblyio:masterfrom
JJ-Cro:update19102026

Conversation

@JJ-Cro

@JJ-Cro JJ-Cro commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Depends on #147 (merge that first; this branch includes its commits).

Summary

Add Gate's RPI order books, stock dual investment, and CrossEx stock/ETF support, plus TradFi kline parameter docs and a README WebSocket section.

Changelog

  • getSpotRpiOrderBook() (GET /spot/rpi_order_book) and getFuturesRpiOrderBook() (GET /futures/{settle}/rpi_order_book).
  • Stock dual investment: getDualStockInvestmentPlans, getDualStockProjectRecommend, getDualStockOrders, submitDualStockOrder, getDualStockBalance, getDualStockOrderRefundPreview, submitDualStockOrderRefund, updateDualStockOrderReinvest (/earn/dual/stock/*). Dual plans get type (call | put).
  • CrossEx: getCrossExSecurityPositions() (GET /crossex/security_positions); stock/ETF symbol format and order rules in JSDoc; CrossExSymbol.tag is required (v4.106.157); CrossExAccountBookStatementType adds SECURITY_DIVIDEND and SECURITY_CORPORATE_ACTION; statement_type filter on account book.
  • TradFi klines: JSDoc for seconds timestamps, limit max 500, and which parameter combinations Gate rejects (checked live).
  • README: "Why not raw ws?" section.
  • Version 1.6.6. Regenerated docs/endpointFunctionList.md, examples/apidoc and llms.txt.

Checks

  • lint, build pass
  • keyless tests pass (v106150, baseUrl, priceOrderAmend, wsStore, public)
  • live public calls: RPI books, TradFi klines, dual plans, CrossEx stock symbol tag

cursoragent and others added 15 commits October 16, 2026 10:14
TestNet REST `futuresTestnet` now uses https://api-testnet.gateapi.io/api/v4.
`baseUrlKey: 'testnet'` is the same host for spot and futures. `futuresTestnet` stays as an alias.

WebSocket TestNet:
- spot: wss://ws-testnet.gate.com/v4/ws/spot
- options: wss://ws-testnet.gate.com/v4/ws/options
- USDT perpetual, BTC perpetual, and delivery hosts still match current Gate docs

Changelog:
- v4.106.160: updateFuturesPriceTriggeredOrder uses PUT /futures/{settle}/price_orders/amend/{order_id}; order_id stays in the body
- v4.106.159: stock trade_status is pre_market | open | post_market
- v4.106.158: OTC fiat and stablecoin order lists use data.lists
- v4.106.148: stock trade_mode, order status, and finish_as enums
- v4.106.147: futures account_book type dividend
- Futures place-order requests accept tpsl_tp_bbo_type and tpsl_sl_bbo_type

Skipped:
- stock time_in_force GTC: docs only list day
- stock client_order_id: already on CreateStockOrderReq
- tpsl bbo fields on FuturesOrder responses: already present

Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
Stop importing FuturesAccountBookType from request types. Response records use FuturesAccountBookRecordType.

Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
Changelog:
- TradFi klines JSDoc: Unix seconds, limit max 500, limit cannot be combined with begin_time and end_time (INVALID_ARGUMENT), begin_time without end_time returns Service is busy
- Public GET /spot/rpi_order_book and GET /futures/{settle}/rpi_order_book
- Stock dual earn under /earn/dual/stock/* and type call|put on dual investment plans
- CrossEx stock/ETF order notes, required tag on /crossex/rule/symbols, GET /crossex/security_positions
- Account book SECURITY_DIVIDEND and SECURITY_CORPORATE_ACTION on statement_type
- README section Why not raw ws, and how this package differs from REST-only gate-api

Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
WebSocket TestNet is useTestnet: true. Drop the baseUrlKey TestNet write-up from the README, quickstart, and option comments.

Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
REST TestNet: useTestnet true uses https://api-testnet.gateapi.io/api/v4. An explicit baseUrl or baseUrlKey still wins.

Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>

@tiagosiebler tiagosiebler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiagosiebler
tiagosiebler merged commit 18a1588 into sieblyio:master Oct 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants