Skip to content

feat(okx): add 15 documented endpoints missing from implicit API#28427

Merged
carlosmiei merged 1 commit intoccxt:masterfrom
lucasjamar:okx-additional-endpoints
Apr 19, 2026
Merged

feat(okx): add 15 documented endpoints missing from implicit API#28427
carlosmiei merged 1 commit intoccxt:masterfrom
lucasjamar:okx-additional-endpoints

Conversation

@lucasjamar
Copy link
Copy Markdown
Contributor

Summary

Audit-driven follow-up to #28425. After grepping all /api/v5/... paths from the OKX docs HTML and diffing against ts/src/okx.ts, 15 documented endpoints were still missing. Touches only ts/src/okx.ts (+17 / -2).

Trading bot — Recurring Buy (6, fills out the family)

HTTP Path Generated method
POST tradingBot/recurring/add-investment privatePostTradingBotRecurringAddInvestment
POST tradingBot/recurring/amend-price-range privatePostTradingBotRecurringAmendPriceRange
POST tradingBot/recurring/amend-recurring-amount privatePostTradingBotRecurringAmendRecurringAmount
POST tradingBot/recurring/amend-recurring-time privatePostTradingBotRecurringAmendRecurringTime
POST tradingBot/recurring/pause privatePostTradingBotRecurringPause
POST tradingBot/recurring/restart privatePostTradingBotRecurringRestart

Trading bot — Grid (1)

HTTP Path Generated method
POST tradingBot/grid/copy-order-algo privatePostTradingBotGridCopyOrderAlgo

Public market data (4)

HTTP Path Generated method
GET market/call-auction-details publicGetMarketCallAuctionDetails
GET public/event-contract/events publicGetPublicEventContractEvents
GET public/event-contract/markets publicGetPublicEventContractMarkets
GET public/event-contract/series publicGetPublicEventContractSeries

market/call-auction-details (plural) is the path currently shown in the OKX docs; ccxt has the singular call-auction-detail. Both are kept, with the old one tagged // deprecated, use call-auction-details in a comment, so existing callers are not broken.

Account (2)

HTTP Path Generated method
GET account/subtypes privateGetAccountSubtypes
POST account/set-riskOffset-amt privatePostAccountSetRiskOffsetAmt

set-riskOffset-amt is the sibling of the already-supported set-riskOffset-type (set the offset amount vs. the offset type).

Stats / support (2)

HTTP Path Generated method
GET rubik/stat/contracts/long-short-position-ratio-contract-top-trader publicGetRubikStatContractsLongShortPositionRatioContractTopTrader
GET support/announcement-types publicGetSupportAnnouncementTypes

support/announcement-types is the path in the current OKX docs; ccxt has support/announcements-types (plural — looks like a typo). Both are kept, with the old one tagged in a comment.

Out of scope

Closes #28426

Test plan

  • npm run pre-transpile clean (TS compile, emitAPI, ESLint, bundle)
  • ts/src/abstract/okx.ts regenerates with all 15 new method signatures
  • Smoke test: instantiate new ccxt.okx() and assert every generated method name is a function — 15/15 pass
  • CI lint chain (Python ruff, PHP syntax) — relying on CI

🤖 Generated with Claude Code

Audit-driven follow-up that fills documented endpoints not present in
ts/src/okx.ts. Touches only the api object; no behavior change.

Trading bot — Recurring Buy (6, fills out the family):
  POST tradingBot/recurring/add-investment
  POST tradingBot/recurring/amend-price-range
  POST tradingBot/recurring/amend-recurring-amount
  POST tradingBot/recurring/amend-recurring-time
  POST tradingBot/recurring/pause
  POST tradingBot/recurring/restart

Trading bot — Grid (1):
  POST tradingBot/grid/copy-order-algo

Public market data (4):
  GET  market/call-auction-details   (sibling rename of call-auction-detail)
  GET  public/event-contract/events
  GET  public/event-contract/markets
  GET  public/event-contract/series

Account (2):
  GET  account/subtypes
  POST account/set-riskOffset-amt    (sibling of set-riskOffset-type)

Stats / support (2):
  GET  rubik/stat/contracts/long-short-position-ratio-contract-top-trader
  GET  support/announcement-types    (sibling rename of announcements-types)

The two "sibling rename" entries (call-auction-detail and announcements-types)
are kept in place and tagged in a comment to avoid breaking existing callers.

Closes ccxt#28426

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@carlosmiei
Copy link
Copy Markdown
Collaborator

@lucasjamar thanks a lot for your contribution!

@carlosmiei carlosmiei merged commit 1d56072 into ccxt:master Apr 19, 2026
10 of 11 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.

[okx] Add 15 documented endpoints missing from implicit API

2 participants