From 201e1bd47908b5b1bc4c06f79adc8bf9a56cf1b6 Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Thu, 3 Sep 2026 14:53:07 +0800 Subject: [PATCH 1/6] add stocks doc --- docs/v5/enum.mdx | 68 ++++++++- docs/v5/stocks/cancel-order.mdx | 62 ++++++++ docs/v5/stocks/convert-detail.mdx | 76 ++++++++++ docs/v5/stocks/convert-list.mdx | 67 +++++++++ docs/v5/stocks/convert-submit.mdx | 141 ++++++++++++++++++ docs/v5/stocks/market-session.mdx | 66 ++++++++ docs/v5/stocks/order-detail.mdx | 91 +++++++++++ docs/v5/stocks/place-order.mdx | 88 +++++++++++ docs/v5/stocks/positions.mdx | 65 ++++++++ .../current.json | 4 + .../current/v5/enum.mdx | 68 ++++++++- .../current/v5/stocks/cancel-order.mdx | 62 ++++++++ .../current/v5/stocks/convert-detail.mdx | 76 ++++++++++ .../current/v5/stocks/convert-list.mdx | 67 +++++++++ .../current/v5/stocks/convert-submit.mdx | 141 ++++++++++++++++++ .../current/v5/stocks/market-session.mdx | 66 ++++++++ .../current/v5/stocks/order-detail.mdx | 91 +++++++++++ .../current/v5/stocks/place-order.mdx | 93 ++++++++++++ .../current/v5/stocks/positions.mdx | 65 ++++++++ sidebars.js | 10 ++ 20 files changed, 1465 insertions(+), 2 deletions(-) create mode 100644 docs/v5/stocks/cancel-order.mdx create mode 100644 docs/v5/stocks/convert-detail.mdx create mode 100644 docs/v5/stocks/convert-list.mdx create mode 100644 docs/v5/stocks/convert-submit.mdx create mode 100644 docs/v5/stocks/market-session.mdx create mode 100644 docs/v5/stocks/order-detail.mdx create mode 100644 docs/v5/stocks/place-order.mdx create mode 100644 docs/v5/stocks/positions.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx create mode 100644 i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx diff --git a/docs/v5/enum.mdx b/docs/v5/enum.mdx index 8a38e10d9c9..57a09a46eb9 100644 --- a/docs/v5/enum.mdx +++ b/docs/v5/enum.mdx @@ -846,4 +846,70 @@ with the example of BTCUSDT: * `Pending` * `Success` * `Settled` -* `Fail` \ No newline at end of file +* `Fail` + +### stocks + +### stocks-side +* `BUY` Buy +* `SELL` Sell + +### stocks-type +* `MARKET` Market order. Uses `notional` (USDC amount) when `BUY`; uses `qty` (shares) when `SELL` +* `LIMIT` Limit order. Requires `qty` and `limitPrice` +* `STOP` Stop order. Requires `qty` and `stopPrice`. Executes as market after the trigger +* `STOP_LIMIT` Stop-limit order. Requires `qty`, `stopPrice` and `limitPrice`. Places a limit order after the trigger + +### stocks-timeInForce +* `DAY` Day order. Auto-cancelled at the main US market close +* `GTC` Good Till Cancelled + +**Note:** `SELL` only supports `DAY` and `GTC`. + +### stocks-tradingSession +* `RTH` Regular Trading Hours (default) +* `24H` 24-hour session, including pre-market, post-market and overnight + +### stocks-orderStatus +* `PENDING` Order accepted and queued for execution. Returned as the initial status by Place Order +* `queued` Queued — order submitted, waiting for market open to execute +* `active` Active — order is live and waiting for fill conditions +* `filled` Filled — order fully filled +* `partial_filled` Cancelled after partial fill — order was cancelled/failed with some prior fills +* `cancelled` Cancelled — order was cancelled/failed with no fills + +### stocks-convertType +* `MINT` Underlying → mStocks Token +* `REDEEM` mStocks Token → Underlying + +### stocks-convertStatus +* `PENDING` Processing +* `SUCCESS` Completed +* `FAILED` Failed + +### stocks-accountType +* `all` Auto-select account (default) +* `uta` Route into the Unified Trading Account (UTA) +* `fund` Route into the Funding Account + +### stocks-flow +* `CEX` Centralized exchange flow. Both Mint and Burn are processed through the Bybit main site +* `DEX` Decentralized flow. Mint to the specified contract address; Burn flow depends on `burnScene` + +### stocks-burnScene +* `DEP` Burn through the Bybit main site (Deposit) +* `NDP` Burn without going through the main site (Non-Deposit) + +### stocks-symbolType +* `US_STOCK` US stock. Currently the only supported instrument type + +### stocks-statusCode +* `PRE` Pre-market (04:00–09:30 ET, XNYS/XNAS only) +* `CORE` Regular hours (09:30–16:00 ET, XNYS/XNAS) +* `POST` Post-market (16:00–20:00 ET, XNYS/XNAS only) +* `OVERNIGHT` Overnight session (20:00 ET–next day 04:00 ET, OCEA) +* `CLOSED` Closed (weekends, holidays, off-hours) + +### stocks-tradingHolidayType +* `HOLIDAY` Statutory holiday. Market closed all day +* `EARLY_CLOSE` Early close. `endTime` is the actual close time of that day diff --git a/docs/v5/stocks/cancel-order.mdx b/docs/v5/stocks/cancel-order.mdx new file mode 100644 index 00000000000..d6664388a82 --- /dev/null +++ b/docs/v5/stocks/cancel-order.mdx @@ -0,0 +1,62 @@ +--- +title: Cancel Stock Order +sidebar_label: Cancel Stock Order +sidebar_position: 2 +--- +Cancel a stock buy or sell order by order number. + +:::info important +- Only non-terminal orders (`queued` / `active`) can be cancelled. Orders in `filled` state will return an error. +- The cancel request is dispatched asynchronously to the router. A successful response does not mean the order has been cancelled on the venue. Please poll the [Get Stock Order Detail](./order-detail) endpoint to confirm the final status. +::: + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|orderNo |**true** |string |System order number | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|orderNo |string |Echo of the order number | + +--- + +### Request Example + + + + +```http +POST /v5/rwa/stocks/order/cancel HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "orderNo": "SB227696733955111526412" +} +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412" + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/docs/v5/stocks/convert-detail.mdx b/docs/v5/stocks/convert-detail.mdx new file mode 100644 index 00000000000..73fe7ec6848 --- /dev/null +++ b/docs/v5/stocks/convert-detail.mdx @@ -0,0 +1,76 @@ +--- +title: Get Convert Detail +sidebar_label: Get Convert Detail +sidebar_position: 6 +--- +Query the full status and settlement result of a single Convert order by order number or idempotency key. Used for MM reconciliation, status polling and failure diagnosis. + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|orderNo |false |string |Convert order number. Either `orderNo` or `requestId` is **required** | +|requestId |false |string |Idempotency key used at submission. Either `orderNo` or `requestId` is **required** | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|orderNo |string |Convert order number | +|requestId |string |Client idempotency key | +|[status](../enum#stocks-convertstatus) |string |Current order status | +|[convertType](../enum#stocks-converttype) |string |Direction | +|symbol |string |Underlying stock symbol | +|tokenSymbol |string |Corresponding mStocks Token | +|inputAmount |string |Input amount | +|outputAmount |string |Actual output amount. Estimated value when not settled | +|appliedMultiplier |string |Actually applied conversion ratio | +|[accountType](../enum#stocks-accounttype) |string |Account type. Only effective for `REDEEM` | +|failReason |string |Failure reason. Non-empty when `status=FAILED` | +|submittedAt |integer |Server accepted timestamp in milliseconds | +|updatedAt |integer |Last update timestamp in milliseconds | + +--- + +### Request Example + + + + +```http +GET /v5/rwa/stocks/convert/detail?orderNo=CVT1755590600987654321 HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "CVT1755590600987654321", + "requestId": "mm-cvt-20260819-0007", + "status": "SUCCESS", + "convertType": "MINT", + "symbol": "AAPL-US", + "tokenSymbol": "AAPLM", + "inputAmount": "5", + "outputAmount": "50", + "appliedMultiplier": "10", + "accountType": null, + "failReason": null, + "submittedAt": 1755590600180, + "updatedAt": 1755590620400 + }, + "time": 1724534400123 +} +``` diff --git a/docs/v5/stocks/convert-list.mdx b/docs/v5/stocks/convert-list.mdx new file mode 100644 index 00000000000..f18110976a1 --- /dev/null +++ b/docs/v5/stocks/convert-list.mdx @@ -0,0 +1,67 @@ +--- +title: Get Convert List +sidebar_label: Get Convert List +sidebar_position: 4 +--- +Query the currently supported Convert symbols and live rate snapshots. Used for quote display and front-end snapshot validation before submitting a Convert request. + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|symbol |false |string |Filter by symbol, e.g. `AAPL-US`. Returns all supported symbols if omitted | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|data |array<object> |Convert symbol list | +|> symbol |string |Underlying stock symbol, e.g. `AAPL-US` | +|> tokenSymbol |string |Corresponding mStocks Token, e.g. `AAPLM` | +|> multiplier |string |Currently effective conversion ratio (1 share of underlying → N Tokens) | +|> mintEnabled |boolean |Whether MINT (underlying → Token) is allowed | +|> redeemEnabled |boolean |Whether REDEEM (Token → underlying) is allowed | +|> minInputAmount |string |Minimum input amount per submission | + +--- + +### Request Example + + + + +```http +GET /v5/rwa/stocks/convert/list HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "data": [ + { + "symbol": "AAPL-US", + "tokenSymbol": "AAPLM", + "multiplier": "10", + "mintEnabled": true, + "redeemEnabled": true, + "minInputAmount": "0.1" + } + ] + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/docs/v5/stocks/convert-submit.mdx b/docs/v5/stocks/convert-submit.mdx new file mode 100644 index 00000000000..18f9077b75e --- /dev/null +++ b/docs/v5/stocks/convert-submit.mdx @@ -0,0 +1,141 @@ +--- +title: Submit Convert +sidebar_label: Submit Convert +sidebar_position: 5 +--- +Submit a Convert order. Supports both directions: `MINT` (underlying → mStocks Token) and `REDEEM` (mStocks Token → underlying). The client must attach the rate snapshot `frontMultiplier` obtained from [Get Convert List](./convert-list); the server validates it against the currently effective ratio to prevent execution anomalies caused by rate jumps. + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|[convertType](../enum#stocks-converttype) |**true** |string |Direction. `MINT`, `REDEEM` | +|symbol |**true** |string |Underlying stock symbol, e.g. `AAPL-US` | +|inputAmount |**true** |string |Input amount. Number of underlying shares when `MINT`; number of Tokens when `REDEEM` | +|frontMultiplier |**true** |string |Conversion ratio from the front-end snapshot | +|[accountType](../enum#stocks-accounttype) |false |string |Only effective when `REDEEM`. `all` (default), `uta`, `fund` | +|requestId |**true** |string |Idempotency key. Length ≤ 36. Alphanumeric plus `-` `_`. Must be unique within 24 hours for the same MM account | +|contractAddr |**true** |string |Token receive address when `MINT`; Token provide address when `REDEEM` | +|[flow](../enum#stocks-flow) |**true** |string |`CEX`, `DEX`. `MINT` flows are identical across CEX/DEX (mint to the specified address). `REDEEM` (burn) flows differ between CEX and DEX | +|[burnScene](../enum#stocks-burnscene) |false |string |Scene for DEX burn. `DEP` (through Bybit main site), `NDP` (not through Bybit main site) | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|orderNo |string |Convert order number | +|[status](../enum#stocks-convertstatus) |string |Initial Convert status | +|[convertType](../enum#stocks-converttype) |string |Echo of direction | +|symbol |string |Echo of symbol | +|inputAmount |string |Echo of input amount | +|outputAmount |string |Output amount | +|appliedMultiplier |string |Actually applied conversion ratio | +|submittedAt |integer |Server accepted timestamp in milliseconds | + +--- + +### Request Example + + + + +```http +POST /v5/rwa/stocks/convert/submit HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "convertType": "MINT", + "symbol": "TSLA-US", + "inputAmount": "1", + "frontMultiplier": "1", + "requestId": "mm-cvt-20260825-0001" +} +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "MM20240825001", + "status": "PENDING", + "convertType": "MINT", + "symbol": "AAPL", + "inputAmount": "100", + "outputAmount": "1", + "appliedMultiplier": "100", + "submittedAt": 1724534400000 + }, + "time": 1724534400123 +} +``` + +### Scenario Examples + +```json +// Scenario 1: CEX Mint (Underlying → Token) +{ + "convertType": "MINT", + "symbol": "AAPL-US", + "inputAmount": "5", + "frontMultiplier": "10", + "flow": "CEX", + "contractAddr": "0xabc...", + "requestId": "mm-001" +} + +// Scenario 2: CEX Burn (Token → Underlying) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "CEX", + "accountType": "all", + "requestId": "mm-002" +} + +// Scenario 3: DEX Mint (Underlying → Token) +{ + "convertType": "MINT", + "symbol": "AAPL-US", + "inputAmount": "5", + "frontMultiplier": "10", + "flow": "DEX", + "contractAddr": "0xabc...", + "requestId": "mm-003" +} + +// Scenario 4a: DEX Burn through Bybit main site (DEP) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "DEX", + "burnScene": "DEP", + "requestId": "mm-004" +} + +// Scenario 4b: DEX Burn not through main site — on-chain transfer (NDP) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "DEX", + "burnScene": "NDP", + "requestId": "mm-005" +} +``` diff --git a/docs/v5/stocks/market-session.mdx b/docs/v5/stocks/market-session.mdx new file mode 100644 index 00000000000..7934047260c --- /dev/null +++ b/docs/v5/stocks/market-session.mdx @@ -0,0 +1,66 @@ +--- +title: Get Market Session +sidebar_label: Get Market Session +sidebar_position: 9 +--- +Query the current trading session state of the stock market and the list of non-tradable periods (early close and holidays). + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|symbol |false |string |Stock symbol, e.g. `AAPL-US` | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|[symbolType](../enum#stocks-symboltype) |string |Stock type. `US_STOCK` | +|[statusCode](../enum#stocks-statuscode) |string |Current session state. `PRE`, `CORE`, `POST`, `OVERNIGHT`, `CLOSED` | +|serverTime |integer |Server UTC epoch ms. Used to eliminate client local time drift | +|currentPhaseEndTime |integer |Current phase end time (epoch ms) | +|nextMarketOpenTime |integer |Next main-market open time (epoch ms) | +|stocksTradingHoliday |array<object> |All non-tradable periods | +|> [type](../enum#stocks-tradingholidaytype) |string |Type. `EARLY_CLOSE`, `HOLIDAY` | +|> startTime |string |Start time | +|> endTime |string |End time | + +--- + +### Request Example + + + + +```http +GET /v5/rwa/stocks/market/session?symbol=TSLA-US HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787662431425 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "symbolType": "US_STOCK", + "statusCode": "POST", + "serverTime": 1787662431425, + "currentPhaseEndTime": 1787299200000, + "nextMarketOpenTime": 1787319000000, + "stocksTradingHoliday": [ + { "type": "HOLIDAY", "startTime": 1756684800000, "endTime": 1756771200000 } + ] + }, + "time": 1787662431500 +} +``` diff --git a/docs/v5/stocks/order-detail.mdx b/docs/v5/stocks/order-detail.mdx new file mode 100644 index 00000000000..a6550843705 --- /dev/null +++ b/docs/v5/stocks/order-detail.mdx @@ -0,0 +1,91 @@ +--- +title: Get Stock Order Detail +sidebar_label: Get Stock Order Detail +sidebar_position: 3 +--- +Query the full status, parameters and fill details of a single stock order by order number or client order ID. Used for MM reconciliation, status polling and failure diagnosis. + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|orderNo |false |string |System order number. Either `orderNo` or `clientOrderId` is **required** | +|clientOrderId |false |string |Client idempotency ID. Either `orderNo` or `clientOrderId` is **required** | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|orderNo |string |System order number | +|clientOrderId |string |Client order ID (if provided at placement) | +|symbol |string |Stock symbol | +|quoteToken |string |Quote asset | +|[side](../enum#stocks-side) |string |Order side | +|[type](../enum#stocks-type) |string |Order type | +|qty |string |Order quantity (shares). May be `null` when the order was placed with `notional` | +|notional |string |Order notional amount (USDC). Non-empty only when `side=BUY` and `type=MARKET` | +|limitPrice |string |Limit price. `null` for non-limit orders | +|stopPrice |string |Trigger price. `null` for non-stop orders | +|[timeInForce](../enum#stocks-timeinforce) |string |Time in force | +|[tradingSession](../enum#stocks-tradingsession) |string |Trading session | +|tokenize |boolean |Whether to auto tokenize | +|[orderStatus](../enum#stocks-orderstatus) |string |Current order status | +|filledQty |string |Cumulative filled quantity (shares) | +|filledNotional |string |Cumulative filled amount (USDC) | +|avgPrice |string |Average fill price (USD). `"0"` when not filled | +|failReason |string |Failure reason. Non-empty when `orderStatus=FAILED` | +|orderTime |integer |Client order timestamp in milliseconds | +|updatedAt |integer |Last update timestamp in milliseconds | + +--- + +### Request Example + + + + +```http +GET /v5/rwa/stocks/order/detail?orderNo=SB227696733955111526412 HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412", + "clientOrderId": "", + "symbol": "TSLA-US", + "quoteToken": "USDC", + "side": "BUY", + "type": "LIMIT", + "qty": "2", + "notional": "", + "limitPrice": "350", + "stopPrice": "", + "timeInForce": "DAY", + "tradingSession": "RTH", + "tokenize": false, + "orderStatus": "cancelled", + "filledQty": "0", + "filledNotional": "0", + "avgPrice": "0", + "failReason": "", + "orderTime": 1786171659000, + "updatedAt": 1786419757000 + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/docs/v5/stocks/place-order.mdx b/docs/v5/stocks/place-order.mdx new file mode 100644 index 00000000000..e9ec3e8c4e9 --- /dev/null +++ b/docs/v5/stocks/place-order.mdx @@ -0,0 +1,88 @@ +--- +title: Place Stock Order +sidebar_label: Place Stock Order +sidebar_position: 1 +--- +This endpoint submits a stock buy or sell order. Buy orders are quoted in USDC, while sell orders are quoted in the number of underlying shares. + +:::info +- **Supported order type :** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` +::: + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|symbol |**true** |string |Stock symbol, e.g. `TSLA-US`, `AAPL-US`| +|quoteToken |**true** |string |Quote asset. Currently only `USDC` is supported| +|[side](../enum#stocks-side) |**true** |string |`BUY`, `SELL`| +|[type](../enum#stocks-type) |**true** |string |Order type. `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT`| +|qty |false |string |Order quantity. **Required** for `SELL`; **required** for `BUY` with `type=LIMIT`/`STOP`/`STOP_LIMIT`. Mutually exclusive with `notional`| +|notional |false |string |Notional amount (USDC). Only valid when `side=BUY` and `type=MARKET`. Mutually exclusive with `qty`| +|limitPrice |false |string |Limit price. **Required** when `type=LIMIT` or `STOP_LIMIT`| +|stopPrice |false |string |Trigger price. **Required** when `type=STOP` or `STOP_LIMIT`| +|[timeInForce](../enum#stocks-timeinforce) |**true** |string |Time in force. `SELL` only supports `DAY` / `GTC`| +|[tradingSession](../enum#stocks-tradingsession) |false |string |Trading session. `RTH` (default), `24H`| +|tokenize |false |boolean |Whether to auto tokenize after the order is filled. Default: `false`. Only valid for `BUY`| +|orderTime |**true** |integer |Client order timestamp in milliseconds| + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|orderNo |string |System order number | +|[orderStatus](../enum#stocks-orderstatus) |string |Initial order status | +|acceptedTime |integer |Server accepted timestamp in milliseconds | + +:::info +The acknowledgement of a place order request indicates that the request was successfully accepted. Please poll the order detail endpoint to confirm the final order status. +::: + +--- + +### Request Example + + + + +```http +POST /v5/rwa/stocks/order HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787656687706 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "symbol": "TSLA-US", + "quoteToken": "USDC", + "side": "BUY", + "type": "LIMIT", + "qty": "2", + "limitPrice": "300.00", + "timeInForce": "DAY", + "tradingSession": "RTH", + "orderTime": 1787656687706 +} +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412", + "orderStatus": "PENDING", + "acceptedTime": 1787657753833 + }, + "retExtInfo": {}, + "time": 1755590400200 +} +``` diff --git a/docs/v5/stocks/positions.mdx b/docs/v5/stocks/positions.mdx new file mode 100644 index 00000000000..2ebf3a3fb67 --- /dev/null +++ b/docs/v5/stocks/positions.mdx @@ -0,0 +1,65 @@ +--- +title: Get Stock Positions +sidebar_label: Get Stock Positions +sidebar_position: 7 +--- +Query all underlying stock position snapshots under the current MM account, including total holdings, available holdings, pending shares and cost. + +### HTTP Request + + +### Request Parameters +| Parameter | Required | Type | Comments| +|:----- |:-------|:-----|------ | +|symbol |false |string |Stock symbol, e.g. `AAPL-US`. Filter by symbol; returns all positions if omitted | +|showZero |false |boolean |Whether to return zero-quantity positions. Default: `false` | + +### Response Parameters +| Parameter | Type | Comments| +|:----- |:-----|----- | +|data |array<object> |Position list | +|> symbol |string |Stock symbol | +|> qty |string |Total position quantity (shares) | +|> availableQty |string |Available position (sellable / transferable) | +|> pendingQty |string |Pending position (locked by pending settlements or orders) | +|> updatedAt |integer |Snapshot update timestamp in milliseconds | + +--- + +### Request Example + + + + +```http +GET /v5/rwa/stocks/positions?showZero=false HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### Response Example + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "data": [ + { + "symbol": "AAPL", + "qty": "100", + "availableQty": "80", + "pendingQty": "20", + "updatedAt": 1724534400000 + } + ] + }, + "time": 1724534400123 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current.json b/i18n/zh-TW/docusaurus-plugin-content-docs/current.json index 70832ecf6a1..bc9e7e041be 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current.json @@ -3,6 +3,10 @@ "message": "Bybit 平台", "description": "The label for category Bybit Platform in sidebar v5SideBar" }, + "sidebar.v5SideBar.category.Stocks": { + "message": "股票", + "description": "The label for category Stocks in sidebar v5SideBar" + }, "sidebar.v5SideBar.category.Web3": { "message": "Web3", "description": "The label for category Web3 in sidebar v5SideBar" diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx index 5c0742e7b15..fe634b2b21c 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx @@ -849,4 +849,70 @@ _期權_: * `Pending` * `Success` * `Settled` -* `Fail` \ No newline at end of file +* `Fail` + +### stocks + +### stocks-side +* `BUY` 買入 +* `SELL` 賣出 + +### stocks-type +* `MARKET` 市價單。`BUY` 時以 `notional`(USDC 金額)計;`SELL` 時以 `qty`(股數)計 +* `LIMIT` 限價單。需填 `qty` 和 `limitPrice` +* `STOP` 止損單。需填 `qty` 和 `stopPrice`;觸發後以市價成交 +* `STOP_LIMIT` 止損限價單。需填 `qty`、`stopPrice` 和 `limitPrice`;觸發後以限價委託 + +### stocks-timeInForce +* `DAY` 當日有效,北美主市場收盤時自動撤單 +* `GTC` 撤銷前持續有效(Good Till Cancelled) + +**注意:** `SELL` 方向僅支持 `DAY` 和 `GTC`。 + +### stocks-tradingSession +* `RTH` Regular Trading Hours,正常交易時段(默認值) +* `24H` 全天候交易時段,包含盤前 / 盤後 / 夜盤 + +### stocks-orderStatus +* `PENDING` 訂單已接收,排隊等待執行。下單接口返回的初始狀態 +* `queued` 排隊中——訂單已提交,等待市場開盤後執行 +* `active` 掛單中——訂單已生效,正在等待成交條件觸發 +* `filled` 已成交——訂單全部成交完成 +* `partial_filled` 部分成交後撤單——訂單被取消 / 失敗,但撤單前已有部分成交 +* `cancelled` 已撤銷——訂單被取消 / 失敗,且無任何成交 + +### stocks-convertType +* `MINT` 正股 → mStocks Token +* `REDEEM` mStocks Token → 正股 + +### stocks-convertStatus +* `PENDING` 處理中 +* `SUCCESS` 處理完成 +* `FAILED` 處理失敗 + +### stocks-accountType +* `all` 自動選擇賬戶(默認值) +* `uta` 指定劃入統一交易賬戶(UTA) +* `fund` 指定劃入資金賬戶 + +### stocks-flow +* `CEX` 中心化交易所鏈路,Mint / Burn 均通過 Bybit 主站處理 +* `DEX` 去中心化鏈路,Mint 到指定合約地址;Burn 流程見 `burnScene` + +### stocks-burnScene +* `DEP` Bybit 主站(Deposit)Burn +* `NDP` 不經主站(Non-Deposit)Burn + +### stocks-symbolType +* `US_STOCK` 美股。當前業務僅支持這一種 + +### stocks-statusCode +* `PRE` 盤前(04:00–09:30 ET,僅 XNYS/XNAS) +* `CORE` 盤中(09:30–16:00 ET,XNYS/XNAS) +* `POST` 盤後(16:00–20:00 ET,僅 XNYS/XNAS) +* `OVERNIGHT` 夜盤(20:00 ET–次日 04:00 ET,OCEA) +* `CLOSED` 休市(週末 / 假日 / 時段外) + +### stocks-tradingHolidayType +* `HOLIDAY` 法定假日,全天休市 +* `EARLY_CLOSE` 提前收盤,`endTime` 為當日實際收盤時間 \ No newline at end of file diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx new file mode 100644 index 00000000000..dc69e36bcfe --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx @@ -0,0 +1,62 @@ +--- +title: 撤銷股票委託單 +sidebar_label: 撤銷股票委託單 +sidebar_position: 2 +--- +根據訂單號撤銷一筆股票買賣訂單。 + +:::info 重要 +- 僅非終態訂單(`PENDING` / `PROCESSING`)可撤銷;已完成 / 已撤銷 / 已過期 / 已拒絕的訂單調用會返回錯誤。 +- 撤單請求異步派發到 router,接口返回不代表已實際撤銷,需通過[查詢股票委託單詳情](./order-detail)輪詢最終狀態。 +::: + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|orderNo |**true** |string |系統訂單號 | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|orderNo |string |回顯訂單號 | + +--- + +### 請求示例 + + + + +```http +POST /v5/rwa/stocks/order/cancel HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "orderNo": "SB227696733955111526412" +} +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412" + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx new file mode 100644 index 00000000000..fa67c03031d --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx @@ -0,0 +1,76 @@ +--- +title: 查詢 Convert 訂單詳情 +sidebar_label: 查詢 Convert 訂單詳情 +sidebar_position: 6 +--- +根據訂單號或冪等鍵查詢單筆 Convert 訂單的完整狀態與結算結果。用於 MM 側對賬、狀態輪詢與失敗原因定位。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|orderNo |false |string |Convert 訂單號。`orderNo` 與 `requestId` 二選一 | +|requestId |false |string |提交時使用的冪等鍵。`orderNo` 與 `requestId` 二選一 | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|orderNo |string |Convert 訂單號 | +|requestId |string |客戶端冪等鍵 | +|[status](../enum#stocks-convertstatus) |string |當前訂單狀態 | +|[convertType](../enum#stocks-converttype) |string |方向 | +|symbol |string |底層股票代碼 | +|tokenSymbol |string |對應的 mStocks Token | +|inputAmount |string |輸入量 | +|outputAmount |string |實際輸出量,未完成時為預估值 | +|appliedMultiplier |string |實際生效的轉換比例 | +|[accountType](../enum#stocks-accounttype) |string |賬戶類型,僅 `REDEEM` 有效 | +|failReason |string |失敗原因,`status=FAILED` 時非空 | +|submittedAt |integer |服務端受理毫秒時間戳 | +|updatedAt |integer |訂單最近變更毫秒時間戳 | + +--- + +### 請求示例 + + + + +```http +GET /v5/rwa/stocks/convert/detail?orderNo=CVT1755590600987654321 HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "CVT1755590600987654321", + "requestId": "mm-cvt-20260819-0007", + "status": "SUCCESS", + "convertType": "MINT", + "symbol": "AAPL-US", + "tokenSymbol": "AAPLM", + "inputAmount": "5", + "outputAmount": "50", + "appliedMultiplier": "10", + "accountType": null, + "failReason": null, + "submittedAt": 1755590600180, + "updatedAt": 1755590620400 + }, + "time": 1724534400123 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx new file mode 100644 index 00000000000..86c12c8d833 --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx @@ -0,0 +1,67 @@ +--- +title: Convert 列表 +sidebar_label: Convert 列表 +sidebar_position: 4 +--- +獲取當前支持的 Convert 交易對及實時匯率快照,用於提交 Convert 前的報價展示與前端快照校驗。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|symbol |false |string |按標的過濾,如 `AAPL-US`;不傳則返回全部 | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|data |array<object> |Convert 交易對列表 | +|> symbol |string |底層股票代碼,如 `AAPL-US` | +|> tokenSymbol |string |對應的 mStocks Token,如 `AAPLM` | +|> multiplier |string |當前生效的轉換比例(1 股正股 → 若干 Token) | +|> mintEnabled |boolean |是否允許 MINT 方向(正股→Token) | +|> redeemEnabled |boolean |是否允許 REDEEM 方向(Token→正股) | +|> minInputAmount |string |單筆最小輸入量 | + +--- + +### 請求示例 + + + + +```http +GET /v5/rwa/stocks/convert/list HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "data": [ + { + "symbol": "AAPL-US", + "tokenSymbol": "AAPLM", + "multiplier": "10", + "mintEnabled": true, + "redeemEnabled": true, + "minInputAmount": "0.1" + } + ] + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx new file mode 100644 index 00000000000..7544619d356 --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx @@ -0,0 +1,141 @@ +--- +title: 提交 Convert +sidebar_label: 提交 Convert +sidebar_position: 5 +--- +提交一筆 Convert 訂單。支持 `MINT`(正股 → mStocks Token)與 `REDEEM`(mStocks Token → 正股)兩種方向。提交時需帶上從 [Convert 列表](./convert-list) 拿到的匯率快照 `frontMultiplier`,服務端會校驗是否與當前生效匯率一致,防止行情跳變導致的成交異常。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|[convertType](../enum#stocks-converttype) |**true** |string |方向:`MINT`, `REDEEM` | +|symbol |**true** |string |底層股票代碼,如 `AAPL-US` | +|inputAmount |**true** |string |輸入數量(`MINT` 時為正股數量,`REDEEM` 時為 Token 數量) | +|frontMultiplier |**true** |string |前端快照的轉換比例 | +|[accountType](../enum#stocks-accounttype) |false |string |僅 `REDEEM` 生效:`all`(默認), `uta`, `fund` | +|requestId |**true** |string |冪等鍵,長度 ≤ 36,字母數字與 `-` `_`。同一 MM 賬號下 24 小時內唯一 | +|contractAddr |**true** |string |`MINT` 時代幣接收地址,`REDEEM` 時代幣提供地址 | +|[flow](../enum#stocks-flow) |**true** |string |`CEX`, `DEX`。對於 `MINT`,CEX / DEX 都是 mint 到指定地址,流程一致;對於 `REDEEM`(burn),CEX 與 DEX 流程不一致 | +|[burnScene](../enum#stocks-burnscene) |false |string |DEX 鏈路 burn 時的場景。`DEP`(走 Bybit 主站);`NDP`(不走 Bybit 主站) | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|orderNo |string |Convert 訂單號 | +|[status](../enum#stocks-convertstatus) |string |Convert 初始狀態 | +|[convertType](../enum#stocks-converttype) |string |回顯方向 | +|symbol |string |回顯標的 | +|inputAmount |string |回顯輸入量 | +|outputAmount |string |輸出量 | +|appliedMultiplier |string |實際生效的轉換比例 | +|submittedAt |integer |服務端受理毫秒時間戳 | + +--- + +### 請求示例 + + + + +```http +POST /v5/rwa/stocks/convert/submit HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "convertType": "MINT", + "symbol": "TSLA-US", + "inputAmount": "1", + "frontMultiplier": "1", + "requestId": "mm-cvt-20260825-0001" +} +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "MM20240825001", + "status": "PENDING", + "convertType": "MINT", + "symbol": "AAPL", + "inputAmount": "100", + "outputAmount": "1", + "appliedMultiplier": "100", + "submittedAt": 1724534400000 + }, + "time": 1724534400123 +} +``` + +### 場景示例 + +```json +// 場景 1:CEX Mint(正股 → Token) +{ + "convertType": "MINT", + "symbol": "AAPL-US", + "inputAmount": "5", + "frontMultiplier": "10", + "flow": "CEX", + "contractAddr": "0xabc...", + "requestId": "mm-001" +} + +// 場景 2:CEX Burn(Token → 正股) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "CEX", + "accountType": "all", + "requestId": "mm-002" +} + +// 場景 3:DEX Mint(正股 → Token) +{ + "convertType": "MINT", + "symbol": "AAPL-US", + "inputAmount": "5", + "frontMultiplier": "10", + "flow": "DEX", + "contractAddr": "0xabc...", + "requestId": "mm-003" +} + +// 場景 4a:DEX Burn,走 Bybit 主站(DEP) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "DEX", + "burnScene": "DEP", + "requestId": "mm-004" +} + +// 場景 4b:DEX Burn,不走主站,鏈上直接劃轉(NDP) +{ + "convertType": "REDEEM", + "symbol": "AAPL-US", + "inputAmount": "50", + "frontMultiplier": "10", + "flow": "DEX", + "burnScene": "NDP", + "requestId": "mm-005" +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx new file mode 100644 index 00000000000..140f1b39c8b --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx @@ -0,0 +1,66 @@ +--- +title: 交易日曆數據 +sidebar_label: 交易日曆數據 +sidebar_position: 9 +--- +查詢當前股市交易時段狀態以及不可交易時間段列表(提前收盤、法定假日)。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|symbol |false |string |股票代碼,例如 `AAPL-US` | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|[symbolType](../enum#stocks-symboltype) |string |股票類型。`US_STOCK` | +|[statusCode](../enum#stocks-statuscode) |string |當前股票所處狀態。`PRE`, `CORE`, `POST`, `OVERNIGHT`, `CLOSED` | +|serverTime |integer |服務端 UTC epoch ms,用來消除用戶本地時間誤差 | +|currentPhaseEndTime |integer |當前時段結束時間(epoch ms) | +|nextMarketOpenTime |integer |下次主市場開盤時間(epoch ms) | +|stocksTradingHoliday |array<object> |所有不可交易時間段 | +|> [type](../enum#stocks-tradingholidaytype) |string |類型。`EARLY_CLOSE`, `HOLIDAY` | +|> startTime |string |開始時間 | +|> endTime |string |結束時間 | + +--- + +### 請求示例 + + + + +```http +GET /v5/rwa/stocks/market/session?symbol=TSLA-US HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787662431425 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "symbolType": "US_STOCK", + "statusCode": "POST", + "serverTime": 1787662431425, + "currentPhaseEndTime": 1787299200000, + "nextMarketOpenTime": 1787319000000, + "stocksTradingHoliday": [ + { "type": "HOLIDAY", "startTime": 1756684800000, "endTime": 1756771200000 } + ] + }, + "time": 1787662431500 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx new file mode 100644 index 00000000000..eb4dea283dc --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx @@ -0,0 +1,91 @@ +--- +title: 查詢股票委託單詳情 +sidebar_label: 查詢股票委託單詳情 +sidebar_position: 3 +--- +根據訂單號或客戶端訂單號查詢單筆股票買賣訂單的完整狀態、參數與成交明細。用於 MM 側對賬、狀態輪詢與失敗原因定位。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|orderNo |false |string |系統訂單號。`orderNo` 與 `clientOrderId` 二選一 | +|clientOrderId |false |string |客戶端冪等 ID。`orderNo` 與 `clientOrderId` 二選一 | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|orderNo |string |系統訂單號 | +|clientOrderId |string |客戶端訂單號(若下單時提供) | +|symbol |string |股票代碼 | +|quoteToken |string |計價資產 | +|[side](../enum#stocks-side) |string |方向 | +|[type](../enum#stocks-type) |string |訂單類型 | +|qty |string |委託數量(股),下單為 `notional` 時可能為 `null` | +|notional |string |委託名義額(USDC),僅 `side=BUY` 且 `type=MARKET` 時非空 | +|limitPrice |string |限價,非限價單為 `null` | +|stopPrice |string |觸發價,非止損單為 `null` | +|[timeInForce](../enum#stocks-timeinforce) |string |有效期 | +|[tradingSession](../enum#stocks-tradingsession) |string |交易時段 | +|tokenize |boolean |是否自動 tokenize | +|[orderStatus](../enum#stocks-orderstatus) |string |當前訂單狀態 | +|filledQty |string |累計成交數量(股) | +|filledNotional |string |累計成交金額(USDC) | +|avgPrice |string |成交均價(USD),未成交為 `"0"` | +|failReason |string |失敗原因,`orderStatus=FAILED` 時非空 | +|orderTime |integer |客戶端下單毫秒時間戳 | +|updatedAt |integer |訂單最近變更毫秒時間戳 | + +--- + +### 請求示例 + + + + +```http +GET /v5/rwa/stocks/order/detail?orderNo=SB227696733955111526412 HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412", + "clientOrderId": "", + "symbol": "TSLA-US", + "quoteToken": "USDC", + "side": "BUY", + "type": "LIMIT", + "qty": "2", + "notional": "", + "limitPrice": "350", + "stopPrice": "", + "timeInForce": "DAY", + "tradingSession": "RTH", + "tokenize": false, + "orderStatus": "cancelled", + "filledQty": "0", + "filledNotional": "0", + "avgPrice": "0", + "failReason": "", + "orderTime": 1786171659000, + "updatedAt": 1786419757000 + }, + "retExtInfo": {}, + "time": 1787657753833 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx new file mode 100644 index 00000000000..96720f93e62 --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx @@ -0,0 +1,93 @@ +--- +title: 股票下單 +sidebar_label: 股票下單 +sidebar_position: 1 +--- +本接口提交一筆股票買入或賣出訂單。買入以 USDC 計價,賣出以標的股數計價。 + +:::info +- **支持的訂單類型 (`type`):** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` +- **委託數量與名義額:**
+`qty` 對 `SELL` 訂單、以及 `BUY` 且 `type=LIMIT`/`STOP`/`STOP_LIMIT` 的訂單為**必傳**。
+`notional` 僅在 `side=BUY` 且 `type=MARKET` 時使用。`qty` 與 `notional` 互斥。 +- **timeInForce:** `SELL` 方向僅支持 `DAY` / `GTC`。 +- **tokenize:** 僅對 `BUY` 生效。若為 `true`,訂單成交後將自動 tokenize。 +::: + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|symbol |**true** |string |股票代碼,例如 `TSLA-US`、`AAPL-US`| +|quoteToken |**true** |string |計價資產,當前僅支持 `USDC`| +|[side](../enum#stocks-side) |**true** |string |方向:`BUY`, `SELL`| +|[type](../enum#stocks-type) |**true** |string |訂單類型:`MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT`| +|qty |false |string |委託數量(股)。`SELL` **必傳**;`BUY` 的 `LIMIT`/`STOP`/`STOP_LIMIT` **必傳**;與 `notional` 互斥| +|notional |false |string |名義額(USDC)。僅 `side=BUY` 且 `type=MARKET` 時使用;與 `qty` 互斥| +|limitPrice |false |string |限價。`type=LIMIT` 或 `STOP_LIMIT` 時**必傳**| +|stopPrice |false |string |觸發價。`type=STOP` 或 `STOP_LIMIT` 時**必傳**| +|[timeInForce](../enum#stocks-timeinforce) |**true** |string |有效期。`SELL` 僅支持 `DAY` / `GTC`| +|[tradingSession](../enum#stocks-tradingsession) |false |string |交易時段:`RTH`(默認), `24H`| +|tokenize |false |boolean |是否在成交後自動 tokenize,默認 `false`;僅對 `BUY` 生效| +|orderTime |**true** |integer |客戶端下單毫秒時間戳| + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|orderNo |string |系統訂單號 | +|[orderStatus](../enum#stocks-orderstatus) |string |訂單初始狀態 | +|acceptedTime |integer |服務端受理毫秒時間戳 | + +:::info +下單請求返回 ack 僅表示請求被成功接受。請通過查詢股票訂單詳情接口輪詢最終訂單狀態。 +::: + +--- + +### 請求示例 + + + + +```http +POST /v5/rwa/stocks/order HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787656687706 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +Content-Type: application/json + +{ + "symbol": "TSLA-US", + "quoteToken": "USDC", + "side": "BUY", + "type": "LIMIT", + "qty": "2", + "limitPrice": "300.00", + "timeInForce": "DAY", + "tradingSession": "RTH", + "orderTime": 1787656687706 +} +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "orderNo": "SB227696733955111526412", + "orderStatus": "PENDING", + "acceptedTime": 1787657753833 + }, + "retExtInfo": {}, + "time": 1755590400200 +} +``` diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx new file mode 100644 index 00000000000..5a7fffb2eb1 --- /dev/null +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx @@ -0,0 +1,65 @@ +--- +title: 查詢股票持倉 +sidebar_label: 查詢股票持倉 +sidebar_position: 7 +--- +查詢當前 MM 賬號下所有正股持倉快照,包含總持倉、可用持倉、在途、成本。 + +### HTTP請求 + + +### 請求參數 +| 參數 | 是否必需 | 類型 | 說明| +|:----- |:-------|:-----|------ | +|symbol |false |string |股票代碼,例如 `AAPL-US`。按標的過濾;不傳則返回全部持倉 | +|showZero |false |boolean |是否返回零持倉,默認 `false` | + +### 響應參數 +| 參數 | 類型 | 說明| +|:----- |:-----|----- | +|data |array<object> |持倉列表 | +|> symbol |string |股票代碼 | +|> qty |string |總持倉數量(股) | +|> availableQty |string |可用持倉數量(可賣出 / 可轉出) | +|> pendingQty |string |在途持倉數量(待結算或訂單鎖定) | +|> updatedAt |integer |快照更新毫秒時間戳 | + +--- + +### 請求示例 + + + + +```http +GET /v5/rwa/stocks/positions?showZero=false HTTP/1.1 +Host: api-testnet.bybit.com +X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx +X-BAPI-TIMESTAMP: 1787657753833 +X-BAPI-RECV-WINDOW: 5000 +X-BAPI-SIGN: XXXXX +``` + + + + +### 響應示例 + +```json +{ + "retCode": 0, + "retMsg": "ok", + "result": { + "data": [ + { + "symbol": "AAPL", + "qty": "100", + "availableQty": "80", + "pendingQty": "20", + "updatedAt": 1724534400000 + } + ] + }, + "time": 1724534400123 +} +``` diff --git a/sidebars.js b/sidebars.js index 40660a9f767..dd852481075 100644 --- a/sidebars.js +++ b/sidebars.js @@ -187,6 +187,16 @@ const sidebars = { } ] }, + { + type: 'category', + label: 'Stocks', + items: [ + { + type: 'autogenerated', + dirName: 'v5/stocks' + } + ] + }, // #3: Spot Margin Trade renamed (removed UTA), moved right after Trade { type: 'category', From de2fed120ddb5a6dddba1a1842f0a79afdc0b012 Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Thu, 3 Sep 2026 14:59:40 +0800 Subject: [PATCH 2/6] change desc --- docs/v5/stocks/cancel-order.mdx | 2 +- .../current/v5/stocks/cancel-order.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/v5/stocks/cancel-order.mdx b/docs/v5/stocks/cancel-order.mdx index d6664388a82..aa663944402 100644 --- a/docs/v5/stocks/cancel-order.mdx +++ b/docs/v5/stocks/cancel-order.mdx @@ -6,7 +6,7 @@ sidebar_position: 2 Cancel a stock buy or sell order by order number. :::info important -- Only non-terminal orders (`queued` / `active`) can be cancelled. Orders in `filled` state will return an error. +- Only non-terminal orders (`queued` / `active`) can be cancelled. - The cancel request is dispatched asynchronously to the router. A successful response does not mean the order has been cancelled on the venue. Please poll the [Get Stock Order Detail](./order-detail) endpoint to confirm the final status. ::: diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx index dc69e36bcfe..1b5c94cc72d 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx @@ -6,7 +6,7 @@ sidebar_position: 2 根據訂單號撤銷一筆股票買賣訂單。 :::info 重要 -- 僅非終態訂單(`PENDING` / `PROCESSING`)可撤銷;已完成 / 已撤銷 / 已過期 / 已拒絕的訂單調用會返回錯誤。 +- 僅非終態訂單(`queued` / `active`)可撤銷。 - 撤單請求異步派發到 router,接口返回不代表已實際撤銷,需通過[查詢股票委託單詳情](./order-detail)輪詢最終狀態。 ::: From 1faa27d16c1038983a6e8921812f94e5d20f3e39 Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Fri, 4 Sep 2026 09:33:39 +0800 Subject: [PATCH 3/6] optimizaiton --- docs/v5/stocks/market-session.mdx | 2 +- .../current/v5/stocks/market-session.mdx | 2 +- .../current/v5/stocks/place-order.mdx | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/v5/stocks/market-session.mdx b/docs/v5/stocks/market-session.mdx index 7934047260c..beb3efc9f10 100644 --- a/docs/v5/stocks/market-session.mdx +++ b/docs/v5/stocks/market-session.mdx @@ -1,7 +1,7 @@ --- title: Get Market Session sidebar_label: Get Market Session -sidebar_position: 9 +sidebar_position: 8 --- Query the current trading session state of the stock market and the list of non-tradable periods (early close and holidays). diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx index 140f1b39c8b..4c3bd3e093f 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx @@ -1,7 +1,7 @@ --- title: 交易日曆數據 sidebar_label: 交易日曆數據 -sidebar_position: 9 +sidebar_position: 8 --- 查詢當前股市交易時段狀態以及不可交易時間段列表(提前收盤、法定假日)。 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx index 96720f93e62..fccb27aaa8a 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx @@ -7,11 +7,6 @@ sidebar_position: 1 :::info - **支持的訂單類型 (`type`):** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` -- **委託數量與名義額:**
-`qty` 對 `SELL` 訂單、以及 `BUY` 且 `type=LIMIT`/`STOP`/`STOP_LIMIT` 的訂單為**必傳**。
-`notional` 僅在 `side=BUY` 且 `type=MARKET` 時使用。`qty` 與 `notional` 互斥。 -- **timeInForce:** `SELL` 方向僅支持 `DAY` / `GTC`。 -- **tokenize:** 僅對 `BUY` 生效。若為 `true`,訂單成交後將自動 tokenize。 ::: ### HTTP請求 From 17111d317686659bab6922aa7c207cc2fd702810 Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Fri, 4 Sep 2026 10:13:36 +0800 Subject: [PATCH 4/6] optimization --- docs/v5/stocks/convert-submit.mdx | 2 +- docs/v5/stocks/place-order.mdx | 2 +- docs/v5/stocks/positions.mdx | 2 +- .../current/v5/stocks/convert-submit.mdx | 2 +- .../current/v5/stocks/place-order.mdx | 2 +- .../current/v5/stocks/positions.mdx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/v5/stocks/convert-submit.mdx b/docs/v5/stocks/convert-submit.mdx index 18f9077b75e..149da4f1963 100644 --- a/docs/v5/stocks/convert-submit.mdx +++ b/docs/v5/stocks/convert-submit.mdx @@ -3,7 +3,7 @@ title: Submit Convert sidebar_label: Submit Convert sidebar_position: 5 --- -Submit a Convert order. Supports both directions: `MINT` (underlying → mStocks Token) and `REDEEM` (mStocks Token → underlying). The client must attach the rate snapshot `frontMultiplier` obtained from [Get Convert List](./convert-list); the server validates it against the currently effective ratio to prevent execution anomalies caused by rate jumps. +Submit a Convert order. Supports both directions: `MINT` (underlying → mStocks Token) and `REDEEM` (mStocks Token → underlying). The client must attach the rate snapshot `multiplier` obtained from [Get Convert List](./convert-list); the server validates it against the currently effective ratio to prevent execution anomalies caused by rate jumps. ### HTTP Request diff --git a/docs/v5/stocks/place-order.mdx b/docs/v5/stocks/place-order.mdx index e9ec3e8c4e9..3671e5e542d 100644 --- a/docs/v5/stocks/place-order.mdx +++ b/docs/v5/stocks/place-order.mdx @@ -36,7 +36,7 @@ This endpoint submits a stock buy or sell order. Buy orders are quoted in USDC, |acceptedTime |integer |Server accepted timestamp in milliseconds | :::info -The acknowledgement of a place order request indicates that the request was successfully accepted. Please poll the order detail endpoint to confirm the final order status. +The acknowledgement of a place order request indicates that the request was successfully accepted. Please poll the [Get Stock Order Detail](./order-detail) endpoint to confirm the final order status. ::: --- diff --git a/docs/v5/stocks/positions.mdx b/docs/v5/stocks/positions.mdx index 2ebf3a3fb67..3e803d7ec1b 100644 --- a/docs/v5/stocks/positions.mdx +++ b/docs/v5/stocks/positions.mdx @@ -3,7 +3,7 @@ title: Get Stock Positions sidebar_label: Get Stock Positions sidebar_position: 7 --- -Query all underlying stock position snapshots under the current MM account, including total holdings, available holdings, pending shares and cost. +Query all underlying stock position snapshots under the current MM account, including total holdings, available holdings, pending shares. ### HTTP Request diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx index 7544619d356..2071607d1ce 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx @@ -3,7 +3,7 @@ title: 提交 Convert sidebar_label: 提交 Convert sidebar_position: 5 --- -提交一筆 Convert 訂單。支持 `MINT`(正股 → mStocks Token)與 `REDEEM`(mStocks Token → 正股)兩種方向。提交時需帶上從 [Convert 列表](./convert-list) 拿到的匯率快照 `frontMultiplier`,服務端會校驗是否與當前生效匯率一致,防止行情跳變導致的成交異常。 +提交一筆 Convert 訂單。支持 `MINT`(正股 → mStocks Token)與 `REDEEM`(mStocks Token → 正股)兩種方向。提交時需帶上從 [Convert 列表](./convert-list) 拿到的匯率快照 `multiplier`,服務端會校驗是否與當前生效匯率一致,防止行情跳變導致的成交異常。 ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx index fccb27aaa8a..0c646fd8b62 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx @@ -36,7 +36,7 @@ sidebar_position: 1 |acceptedTime |integer |服務端受理毫秒時間戳 | :::info -下單請求返回 ack 僅表示請求被成功接受。請通過查詢股票訂單詳情接口輪詢最終訂單狀態。 +下單請求返回 ack 僅表示請求被成功接受。請通過[查詢股票委託單詳情](./order-detail)接口輪詢最終訂單狀態。 ::: --- diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx index 5a7fffb2eb1..180d2b39cb0 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx @@ -3,7 +3,7 @@ title: 查詢股票持倉 sidebar_label: 查詢股票持倉 sidebar_position: 7 --- -查詢當前 MM 賬號下所有正股持倉快照,包含總持倉、可用持倉、在途、成本。 +查詢當前 MM 賬號下所有正股持倉快照,包含總持倉、可用持倉、在途。 ### HTTP請求 From 9c842a0558af3f7d6ad89eb17d2e3bad94bc266c Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Fri, 4 Sep 2026 11:31:07 +0800 Subject: [PATCH 5/6] add desc --- docs/v5/stocks/cancel-order.mdx | 1 + docs/v5/stocks/convert-detail.mdx | 4 ++++ docs/v5/stocks/convert-list.mdx | 4 ++++ docs/v5/stocks/convert-submit.mdx | 4 ++++ docs/v5/stocks/market-session.mdx | 4 ++++ docs/v5/stocks/order-detail.mdx | 4 ++++ docs/v5/stocks/place-order.mdx | 3 ++- docs/v5/stocks/positions.mdx | 4 ++++ .../current/v5/stocks/cancel-order.mdx | 1 + .../current/v5/stocks/convert-detail.mdx | 4 ++++ .../current/v5/stocks/convert-list.mdx | 4 ++++ .../current/v5/stocks/convert-submit.mdx | 4 ++++ .../current/v5/stocks/market-session.mdx | 4 ++++ .../current/v5/stocks/order-detail.mdx | 4 ++++ .../current/v5/stocks/place-order.mdx | 1 + .../current/v5/stocks/positions.mdx | 4 ++++ 16 files changed, 53 insertions(+), 1 deletion(-) diff --git a/docs/v5/stocks/cancel-order.mdx b/docs/v5/stocks/cancel-order.mdx index aa663944402..6880db7bf54 100644 --- a/docs/v5/stocks/cancel-order.mdx +++ b/docs/v5/stocks/cancel-order.mdx @@ -6,6 +6,7 @@ sidebar_position: 2 Cancel a stock buy or sell order by order number. :::info important +- This endpoint is only available for Market Maker. - Only non-terminal orders (`queued` / `active`) can be cancelled. - The cancel request is dispatched asynchronously to the router. A successful response does not mean the order has been cancelled on the venue. Please poll the [Get Stock Order Detail](./order-detail) endpoint to confirm the final status. ::: diff --git a/docs/v5/stocks/convert-detail.mdx b/docs/v5/stocks/convert-detail.mdx index 73fe7ec6848..ab10e577aab 100644 --- a/docs/v5/stocks/convert-detail.mdx +++ b/docs/v5/stocks/convert-detail.mdx @@ -5,6 +5,10 @@ sidebar_position: 6 --- Query the full status and settlement result of a single Convert order by order number or idempotency key. Used for MM reconciliation, status polling and failure diagnosis. +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/docs/v5/stocks/convert-list.mdx b/docs/v5/stocks/convert-list.mdx index f18110976a1..0c079929190 100644 --- a/docs/v5/stocks/convert-list.mdx +++ b/docs/v5/stocks/convert-list.mdx @@ -5,6 +5,10 @@ sidebar_position: 4 --- Query the currently supported Convert symbols and live rate snapshots. Used for quote display and front-end snapshot validation before submitting a Convert request. +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/docs/v5/stocks/convert-submit.mdx b/docs/v5/stocks/convert-submit.mdx index 149da4f1963..1a1efecd006 100644 --- a/docs/v5/stocks/convert-submit.mdx +++ b/docs/v5/stocks/convert-submit.mdx @@ -5,6 +5,10 @@ sidebar_position: 5 --- Submit a Convert order. Supports both directions: `MINT` (underlying → mStocks Token) and `REDEEM` (mStocks Token → underlying). The client must attach the rate snapshot `multiplier` obtained from [Get Convert List](./convert-list); the server validates it against the currently effective ratio to prevent execution anomalies caused by rate jumps. +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/docs/v5/stocks/market-session.mdx b/docs/v5/stocks/market-session.mdx index beb3efc9f10..0d37454794f 100644 --- a/docs/v5/stocks/market-session.mdx +++ b/docs/v5/stocks/market-session.mdx @@ -5,6 +5,10 @@ sidebar_position: 8 --- Query the current trading session state of the stock market and the list of non-tradable periods (early close and holidays). +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/docs/v5/stocks/order-detail.mdx b/docs/v5/stocks/order-detail.mdx index a6550843705..2e9d609c8bc 100644 --- a/docs/v5/stocks/order-detail.mdx +++ b/docs/v5/stocks/order-detail.mdx @@ -5,6 +5,10 @@ sidebar_position: 3 --- Query the full status, parameters and fill details of a single stock order by order number or client order ID. Used for MM reconciliation, status polling and failure diagnosis. +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/docs/v5/stocks/place-order.mdx b/docs/v5/stocks/place-order.mdx index 3671e5e542d..4c5a9207f79 100644 --- a/docs/v5/stocks/place-order.mdx +++ b/docs/v5/stocks/place-order.mdx @@ -6,7 +6,8 @@ sidebar_position: 1 This endpoint submits a stock buy or sell order. Buy orders are quoted in USDC, while sell orders are quoted in the number of underlying shares. :::info -- **Supported order type :** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` +- This endpoint is only available for Market Maker. +- **Supported order type:** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` ::: ### HTTP Request diff --git a/docs/v5/stocks/positions.mdx b/docs/v5/stocks/positions.mdx index 3e803d7ec1b..2cb569ae303 100644 --- a/docs/v5/stocks/positions.mdx +++ b/docs/v5/stocks/positions.mdx @@ -5,6 +5,10 @@ sidebar_position: 7 --- Query all underlying stock position snapshots under the current MM account, including total holdings, available holdings, pending shares. +:::info +This endpoint is only available for Market Maker. +::: + ### HTTP Request diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx index 1b5c94cc72d..d9c21996cea 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/cancel-order.mdx @@ -6,6 +6,7 @@ sidebar_position: 2 根據訂單號撤銷一筆股票買賣訂單。 :::info 重要 +- 本接口僅面向做市商(Market Maker)開放。 - 僅非終態訂單(`queued` / `active`)可撤銷。 - 撤單請求異步派發到 router,接口返回不代表已實際撤銷,需通過[查詢股票委託單詳情](./order-detail)輪詢最終狀態。 ::: diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx index fa67c03031d..e351fff539a 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-detail.mdx @@ -5,6 +5,10 @@ sidebar_position: 6 --- 根據訂單號或冪等鍵查詢單筆 Convert 訂單的完整狀態與結算結果。用於 MM 側對賬、狀態輪詢與失敗原因定位。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx index 86c12c8d833..ae828abfcb5 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-list.mdx @@ -5,6 +5,10 @@ sidebar_position: 4 --- 獲取當前支持的 Convert 交易對及實時匯率快照,用於提交 Convert 前的報價展示與前端快照校驗。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx index 2071607d1ce..c1e5b484028 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx @@ -5,6 +5,10 @@ sidebar_position: 5 --- 提交一筆 Convert 訂單。支持 `MINT`(正股 → mStocks Token)與 `REDEEM`(mStocks Token → 正股)兩種方向。提交時需帶上從 [Convert 列表](./convert-list) 拿到的匯率快照 `multiplier`,服務端會校驗是否與當前生效匯率一致,防止行情跳變導致的成交異常。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx index 4c3bd3e093f..e3746bfa873 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx @@ -5,6 +5,10 @@ sidebar_position: 8 --- 查詢當前股市交易時段狀態以及不可交易時間段列表(提前收盤、法定假日)。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx index eb4dea283dc..af36c1b142a 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx @@ -5,6 +5,10 @@ sidebar_position: 3 --- 根據訂單號或客戶端訂單號查詢單筆股票買賣訂單的完整狀態、參數與成交明細。用於 MM 側對賬、狀態輪詢與失敗原因定位。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx index 0c646fd8b62..a69e6fecc12 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx @@ -6,6 +6,7 @@ sidebar_position: 1 本接口提交一筆股票買入或賣出訂單。買入以 USDC 計價,賣出以標的股數計價。 :::info +- 本接口僅面向做市商(Market Maker)開放。 - **支持的訂單類型 (`type`):** `MARKET`, `LIMIT`, `STOP`, `STOP_LIMIT` ::: diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx index 180d2b39cb0..e8546b5ecc9 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/positions.mdx @@ -5,6 +5,10 @@ sidebar_position: 7 --- 查詢當前 MM 賬號下所有正股持倉快照,包含總持倉、可用持倉、在途。 +:::info +本接口僅面向做市商(Market Maker)開放。 +::: + ### HTTP請求 From 8e09bbb451f924e20475b7ecc3eccccd877f59a3 Mon Sep 17 00:00:00 2001 From: doris-xiao-bybit Date: Tue, 8 Sep 2026 11:22:03 +0800 Subject: [PATCH 6/6] change stocks enum --- docs/v5/enum.mdx | 15 ++++++++------- docs/v5/stocks/convert-submit.mdx | 4 ++-- docs/v5/stocks/market-session.mdx | 4 ++-- docs/v5/stocks/order-detail.mdx | 2 +- docs/v5/stocks/place-order.mdx | 4 ++-- .../current/v5/enum.mdx | 15 ++++++++------- .../current/v5/stocks/convert-submit.mdx | 4 ++-- .../current/v5/stocks/market-session.mdx | 4 ++-- .../current/v5/stocks/order-detail.mdx | 2 +- .../current/v5/stocks/place-order.mdx | 4 ++-- 10 files changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/v5/enum.mdx b/docs/v5/enum.mdx index 57a09a46eb9..b9cf3c0fd3b 100644 --- a/docs/v5/enum.mdx +++ b/docs/v5/enum.mdx @@ -863,12 +863,13 @@ with the example of BTCUSDT: ### stocks-timeInForce * `DAY` Day order. Auto-cancelled at the main US market close * `GTC` Good Till Cancelled +* `IOC` Immediate or Cancel. Any unfilled portion is cancelled immediately -**Note:** `SELL` only supports `DAY` and `GTC`. +**Note:** `SELL` only supports `DAY` and `GTC`. `IOC` is supported but constrained to `LIMIT` + whole-share + `RTH`. ### stocks-tradingSession * `RTH` Regular Trading Hours (default) -* `24H` 24-hour session, including pre-market, post-market and overnight +* `24H` 24-hour session, including pre-market, post-market and overnight. Non-`RTH` sessions accept `LIMIT` orders only ### stocks-orderStatus * `PENDING` Order accepted and queued for execution. Returned as the initial status by Place Order @@ -904,11 +905,11 @@ with the example of BTCUSDT: * `US_STOCK` US stock. Currently the only supported instrument type ### stocks-statusCode -* `PRE` Pre-market (04:00–09:30 ET, XNYS/XNAS only) -* `CORE` Regular hours (09:30–16:00 ET, XNYS/XNAS) -* `POST` Post-market (16:00–20:00 ET, XNYS/XNAS only) -* `OVERNIGHT` Overnight session (20:00 ET–next day 04:00 ET, OCEA) -* `CLOSED` Closed (weekends, holidays, off-hours) +* `1` Pre-market (04:00–09:30 ET, XNYS/XNAS only) +* `2` Regular hours (09:30–16:00 ET, XNYS/XNAS) +* `3` Post-market (16:00–20:00 ET, XNYS/XNAS only) +* `4` Overnight session (20:00 ET–next day 04:00 ET, OCEA) +* `5` Closed (weekends, holidays, off-hours) ### stocks-tradingHolidayType * `HOLIDAY` Statutory holiday. Market closed all day diff --git a/docs/v5/stocks/convert-submit.mdx b/docs/v5/stocks/convert-submit.mdx index 1a1efecd006..1bc8c6980f7 100644 --- a/docs/v5/stocks/convert-submit.mdx +++ b/docs/v5/stocks/convert-submit.mdx @@ -21,9 +21,9 @@ This endpoint is only available for Market Maker. |frontMultiplier |**true** |string |Conversion ratio from the front-end snapshot | |[accountType](../enum#stocks-accounttype) |false |string |Only effective when `REDEEM`. `all` (default), `uta`, `fund` | |requestId |**true** |string |Idempotency key. Length ≤ 36. Alphanumeric plus `-` `_`. Must be unique within 24 hours for the same MM account | -|contractAddr |**true** |string |Token receive address when `MINT`; Token provide address when `REDEEM` | +|contractAddr |false |string |Token receive address when `MINT`; Token provide address when `REDEEM`. **Do not send when `flow=DEX` and `burnScene=NDP`** | |[flow](../enum#stocks-flow) |**true** |string |`CEX`, `DEX`. `MINT` flows are identical across CEX/DEX (mint to the specified address). `REDEEM` (burn) flows differ between CEX and DEX | -|[burnScene](../enum#stocks-burnscene) |false |string |Scene for DEX burn. `DEP` (through Bybit main site), `NDP` (not through Bybit main site) | +|[burnScene](../enum#stocks-burnscene) |false |string |Scene for **DEX `REDEEM` (burn)**: `DEP` (through Bybit main site), `NDP` (not through Bybit main site) | ### Response Parameters | Parameter | Type | Comments| diff --git a/docs/v5/stocks/market-session.mdx b/docs/v5/stocks/market-session.mdx index 0d37454794f..22eaa89530d 100644 --- a/docs/v5/stocks/market-session.mdx +++ b/docs/v5/stocks/market-session.mdx @@ -21,7 +21,7 @@ This endpoint is only available for Market Maker. | Parameter | Type | Comments| |:----- |:-----|----- | |[symbolType](../enum#stocks-symboltype) |string |Stock type. `US_STOCK` | -|[statusCode](../enum#stocks-statuscode) |string |Current session state. `PRE`, `CORE`, `POST`, `OVERNIGHT`, `CLOSED` | +|[statusCode](../enum#stocks-statuscode) |integer |Current session state. `1`: pre-market, `2`: regular hours, `3`: post-market, `4`: overnight, `5`: closed | |serverTime |integer |Server UTC epoch ms. Used to eliminate client local time drift | |currentPhaseEndTime |integer |Current phase end time (epoch ms) | |nextMarketOpenTime |integer |Next main-market open time (epoch ms) | @@ -57,7 +57,7 @@ X-BAPI-SIGN: XXXXX "retMsg": "ok", "result": { "symbolType": "US_STOCK", - "statusCode": "POST", + "statusCode": 4, "serverTime": 1787662431425, "currentPhaseEndTime": 1787299200000, "nextMarketOpenTime": 1787319000000, diff --git a/docs/v5/stocks/order-detail.mdx b/docs/v5/stocks/order-detail.mdx index 2e9d609c8bc..67ff24b716e 100644 --- a/docs/v5/stocks/order-detail.mdx +++ b/docs/v5/stocks/order-detail.mdx @@ -38,7 +38,7 @@ This endpoint is only available for Market Maker. |filledQty |string |Cumulative filled quantity (shares) | |filledNotional |string |Cumulative filled amount (USDC) | |avgPrice |string |Average fill price (USD). `"0"` when not filled | -|failReason |string |Failure reason. Non-empty when `orderStatus=FAILED` | +|failReason |string |Failure reason. Value comes from the [orderStatus](../enum#stocks-orderstatus) enum | |orderTime |integer |Client order timestamp in milliseconds | |updatedAt |integer |Last update timestamp in milliseconds | diff --git a/docs/v5/stocks/place-order.mdx b/docs/v5/stocks/place-order.mdx index 4c5a9207f79..5f309013442 100644 --- a/docs/v5/stocks/place-order.mdx +++ b/docs/v5/stocks/place-order.mdx @@ -24,8 +24,8 @@ This endpoint submits a stock buy or sell order. Buy orders are quoted in USDC, |notional |false |string |Notional amount (USDC). Only valid when `side=BUY` and `type=MARKET`. Mutually exclusive with `qty`| |limitPrice |false |string |Limit price. **Required** when `type=LIMIT` or `STOP_LIMIT`| |stopPrice |false |string |Trigger price. **Required** when `type=STOP` or `STOP_LIMIT`| -|[timeInForce](../enum#stocks-timeinforce) |**true** |string |Time in force. `SELL` only supports `DAY` / `GTC`| -|[tradingSession](../enum#stocks-tradingsession) |false |string |Trading session. `RTH` (default), `24H`| +|[timeInForce](../enum#stocks-timeinforce) |**true** |string |Time in force: `DAY` / `GTC` / `IOC`. `SELL` only supports `DAY` / `GTC`; `IOC` requires `type=LIMIT` + whole-share `qty` + `tradingSession=RTH` | +|[tradingSession](../enum#stocks-tradingsession) |false |string |Trading session. `RTH` (default), `24H`. Non-`RTH` sessions accept `LIMIT` orders only | |tokenize |false |boolean |Whether to auto tokenize after the order is filled. Default: `false`. Only valid for `BUY`| |orderTime |**true** |integer |Client order timestamp in milliseconds| diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx index fe634b2b21c..b83b97bd3ed 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/enum.mdx @@ -866,12 +866,13 @@ _期權_: ### stocks-timeInForce * `DAY` 當日有效,北美主市場收盤時自動撤單 * `GTC` 撤銷前持續有效(Good Till Cancelled) +* `IOC` 立即成交,未成交部分立即取消 -**注意:** `SELL` 方向僅支持 `DAY` 和 `GTC`。 +**注意:** `SELL` 方向僅支持 `DAY` 和 `GTC`。`IOC` 支持但有約束(`LIMIT` + 整股 + `RTH`)。 ### stocks-tradingSession * `RTH` Regular Trading Hours,正常交易時段(默認值) -* `24H` 全天候交易時段,包含盤前 / 盤後 / 夜盤 +* `24H` 全天候交易時段,包含盤前 / 盤後 / 夜盤。非 `RTH` 時段只允許 `LIMIT` 單 ### stocks-orderStatus * `PENDING` 訂單已接收,排隊等待執行。下單接口返回的初始狀態 @@ -907,11 +908,11 @@ _期權_: * `US_STOCK` 美股。當前業務僅支持這一種 ### stocks-statusCode -* `PRE` 盤前(04:00–09:30 ET,僅 XNYS/XNAS) -* `CORE` 盤中(09:30–16:00 ET,XNYS/XNAS) -* `POST` 盤後(16:00–20:00 ET,僅 XNYS/XNAS) -* `OVERNIGHT` 夜盤(20:00 ET–次日 04:00 ET,OCEA) -* `CLOSED` 休市(週末 / 假日 / 時段外) +* `1` 盤前(04:00–09:30 ET,僅 XNYS/XNAS) +* `2` 盤中(09:30–16:00 ET,XNYS/XNAS) +* `3` 盤後(16:00–20:00 ET,僅 XNYS/XNAS) +* `4` 夜盤(20:00 ET–次日 04:00 ET,OCEA) +* `5` 休市(週末 / 假日 / 時段外) ### stocks-tradingHolidayType * `HOLIDAY` 法定假日,全天休市 diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx index c1e5b484028..c5096394d22 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/convert-submit.mdx @@ -21,9 +21,9 @@ sidebar_position: 5 |frontMultiplier |**true** |string |前端快照的轉換比例 | |[accountType](../enum#stocks-accounttype) |false |string |僅 `REDEEM` 生效:`all`(默認), `uta`, `fund` | |requestId |**true** |string |冪等鍵,長度 ≤ 36,字母數字與 `-` `_`。同一 MM 賬號下 24 小時內唯一 | -|contractAddr |**true** |string |`MINT` 時代幣接收地址,`REDEEM` 時代幣提供地址 | +|contractAddr |false |string |`MINT` 時代幣接收地址,`REDEEM` 時代幣提供地址。**當 `flow=DEX` 且 `burnScene=NDP` 時不要傳** | |[flow](../enum#stocks-flow) |**true** |string |`CEX`, `DEX`。對於 `MINT`,CEX / DEX 都是 mint 到指定地址,流程一致;對於 `REDEEM`(burn),CEX 與 DEX 流程不一致 | -|[burnScene](../enum#stocks-burnscene) |false |string |DEX 鏈路 burn 時的場景。`DEP`(走 Bybit 主站);`NDP`(不走 Bybit 主站) | +|[burnScene](../enum#stocks-burnscene) |false |string |**DEX `REDEEM`(burn)** 場景:`DEP`(走 Bybit 主站);`NDP`(不走 Bybit 主站) | ### 響應參數 | 參數 | 類型 | 說明| diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx index e3746bfa873..e35ec27e611 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/market-session.mdx @@ -21,7 +21,7 @@ sidebar_position: 8 | 參數 | 類型 | 說明| |:----- |:-----|----- | |[symbolType](../enum#stocks-symboltype) |string |股票類型。`US_STOCK` | -|[statusCode](../enum#stocks-statuscode) |string |當前股票所處狀態。`PRE`, `CORE`, `POST`, `OVERNIGHT`, `CLOSED` | +|[statusCode](../enum#stocks-statuscode) |integer |當前股票所處狀態。`1`: 盤前,`2`: 盤中,`3`: 盤後,`4`: 夜盤,`5`: 休市 | |serverTime |integer |服務端 UTC epoch ms,用來消除用戶本地時間誤差 | |currentPhaseEndTime |integer |當前時段結束時間(epoch ms) | |nextMarketOpenTime |integer |下次主市場開盤時間(epoch ms) | @@ -57,7 +57,7 @@ X-BAPI-SIGN: XXXXX "retMsg": "ok", "result": { "symbolType": "US_STOCK", - "statusCode": "POST", + "statusCode": 4, "serverTime": 1787662431425, "currentPhaseEndTime": 1787299200000, "nextMarketOpenTime": 1787319000000, diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx index af36c1b142a..45d23424bfa 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/order-detail.mdx @@ -38,7 +38,7 @@ sidebar_position: 3 |filledQty |string |累計成交數量(股) | |filledNotional |string |累計成交金額(USDC) | |avgPrice |string |成交均價(USD),未成交為 `"0"` | -|failReason |string |失敗原因,`orderStatus=FAILED` 時非空 | +|failReason |string |失敗原因,取值為 [orderStatus](../enum#stocks-orderstatus) 枚舉之一 | |orderTime |integer |客戶端下單毫秒時間戳 | |updatedAt |integer |訂單最近變更毫秒時間戳 | diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx index a69e6fecc12..5392c40e974 100644 --- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx +++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/v5/stocks/place-order.mdx @@ -24,8 +24,8 @@ sidebar_position: 1 |notional |false |string |名義額(USDC)。僅 `side=BUY` 且 `type=MARKET` 時使用;與 `qty` 互斥| |limitPrice |false |string |限價。`type=LIMIT` 或 `STOP_LIMIT` 時**必傳**| |stopPrice |false |string |觸發價。`type=STOP` 或 `STOP_LIMIT` 時**必傳**| -|[timeInForce](../enum#stocks-timeinforce) |**true** |string |有效期。`SELL` 僅支持 `DAY` / `GTC`| -|[tradingSession](../enum#stocks-tradingsession) |false |string |交易時段:`RTH`(默認), `24H`| +|[timeInForce](../enum#stocks-timeinforce) |**true** |string |有效期:`DAY` / `GTC` / `IOC`。`SELL` 僅支持 `DAY` / `GTC`;`IOC` 需滿足 `type=LIMIT` + 整股 `qty` + `tradingSession=RTH` | +|[tradingSession](../enum#stocks-tradingsession) |false |string |交易時段:`RTH`(默認), `24H`。非 `RTH` 時段只允許 `LIMIT` 單 | |tokenize |false |boolean |是否在成交後自動 tokenize,默認 `false`;僅對 `BUY` 生效| |orderTime |**true** |integer |客戶端下單毫秒時間戳|