KUCOIN API
HomeChange LogAPI DOC V1
Language
  • 繁體中文(即將上綫)
  • Русский (скоро)
HomeChange LogAPI DOC V1
More
SDK
Telegram
Kucoin
  1. REST
  2. Margin Trading
  3. Orders
  • Introduction
  • Authentication
  • Enums Definitions
  • Terms Definitions
  • SDK
  • Rate Limit
  • Change Log
  • User Service
    • Market Making Incentive Scheme
    • VIP Fast Track
    • Broker Program
  • REST
    • Account Info
      • Account & Funding
        • Get Account Summary Info
        • Get Apikey Info
        • Get Account Type - Spot
        • Get Account List - Spot
        • Get Account Detail - Spot
        • Get Account - Cross Margin
        • Get Account - Isolated Margin
        • Get Account - Futures
        • Get Account Ledgers - Spot/Margin
        • Get Account Ledgers - Trade_hf
        • Get Account Ledgers - Margin_hf
        • Get Account Ledgers - Futures
      • Sub Account
        • Add sub-account
        • Add sub-account Margin Permission
        • Add sub-account Futures Permission
        • Get sub-account List - Summary Info
        • Get sub-account Detail - Balance
        • Get sub-account List - Spot Balance (V2)
        • Get sub-account List - Futures Balance (V2)
      • Sub Account API
        • Add sub-account API
        • Modify sub-account API
        • Get sub-account API List
        • Delete sub-account API
      • Deposit
        • Add Deposit Address (V3)
        • Get Deposit Address (V3)
        • Get Deposit History
      • Withdrawals
        • Get Withdrawal Quotas
        • Withdraw (V3)
        • Cancel Withdrawal
        • Get Withdrawal History
        • Get Withdrawal History By ID
      • Transfer
        • Get Transfer Quotas
        • Flex Transfer
      • Trade Fee
        • Get Basic Fee - Spot/Margin
        • Get Actual Fee - Spot/Margin
        • Get Actual Fee - Futures
    • Spot Trading
      • Market Data
        • Get Announcements
        • Get Currency
        • Get All Currencies
        • Get Symbol
        • Get All Symbols
        • Get Ticker
        • Get All Tickers
        • Get Trade History
        • Get Klines
        • Get Part OrderBook
        • Get Full OrderBook
        • Get Call Auction Part OrderBook
        • Get Call Auction Info
        • Get Fiat Price
        • Get 24hr Stats
        • Get Market List
        • Get Client IP Address
        • Get Server Time
        • Get Service Status
      • Orders
        • Add Order
        • Add Order Sync
        • Add Order Test
        • Batch Add Orders
        • Batch Add Orders Sync
        • Cancel Order By OrderId
        • Cancel Order By OrderId Sync
        • Cancel Order By ClientOid
        • Cancel Order By ClientOid Sync
        • Cancel Partial Order
        • Cancel All Orders By Symbol
        • Cancel All Orders
        • Modify Order
        • Get Order By OrderId
        • Get Order By ClientOid
        • Get Symbols With Open Order
        • Get Open Orders
        • Get Open Orders By Page
        • Get Closed Orders
        • Get Trade History
        • Get DCP
        • Set DCP
        • Add Stop Order
        • Cancel Stop Order By ClientOid
        • Cancel Stop Order By OrderId
        • Batch Cancel Stop Orders
        • Get Stop Orders List
        • Get Stop Order By OrderId
        • Get Stop Order By ClientOid
        • Add OCO Order
        • Cancel OCO Order By OrderId
        • Cancel OCO Order By ClientOid
        • Batch Cancel OCO Order
        • Get OCO Order By OrderId
        • Get OCO Order By ClientOid
        • Get OCO Order Detail By OrderId
        • Get OCO Order List
    • Margin Trading
      • Market Data
        • Get Symbols - Cross Margin
        • Get ETF Info
        • Get Mark Price Detail
        • Get Margin Config
        • Get Mark Price List
        • Get Symbols - Isolated Margin
      • Orders
        • Add Order
          POST
        • Add Order Test
          POST
        • Cancel Order By OrderId
          DELETE
        • Cancel Order By ClientOid
          DELETE
        • Cancel All Orders By Symbol
          DELETE
        • Get Symbols With Open Order
          GET
        • Get Open Orders
          GET
        • Get Closed Orders
          GET
        • Get Trade History
          GET
        • Get Order By OrderId
          GET
        • Get Order By ClientOid
          GET
      • Debit
        • Borrow
        • Get Borrow History
        • Repay
        • Get Repay History
        • Get Interest History.
        • Modify Leverage
      • Credit
        • Get Loan Market
        • Get Loan Market Interest Rate
        • Purchase
        • Modify Purchase
        • Get Purchase Orders
        • Redeem
        • Get Redeem Orders
      • Risk Limit
        • Get Margin Risk Limit
    • Futures Trading
      • Market Data
        • Get Symbol
        • Get All Symbols
        • Get Ticker
        • Get All Tickers
        • Get Full OrderBook
        • Get Part OrderBook
        • Get Trade History
        • Get Klines
        • Get Mark Price
        • Get Spot Index Price
        • Get Interest Rate Index
        • Get Premium Index
        • Get 24hr stats
        • Get Server Time
        • Get Service Status
      • Orders
        • Add Order
        • Add Order Test
        • Batch Add Orders
        • Add Take Profit And Stop Loss Order
        • Cancel Order By OrderId
        • Cancel Order By ClientOid
        • Batch Cancel Orders
        • Cancel All Orders
        • Cancel All Stop orders
        • Get Order By OrderId
        • Get Order By ClientOid
        • Get Order List
        • Get Recent Closed Orders
        • Get Stop Order List
        • Get Open Order Value
        • Get Recent Trade History
        • Get Trade History
      • Positions
        • Get Margin Mode
        • Switch Margin Mode
        • Batch Switch Margin Mode
        • Get Max Open Size
        • Get Position Details
        • Get Position List
        • Get Positions History
        • Get Max Withdraw Margin
        • Get Cross Margin Leverage
        • Modify Cross Margin Leverage
        • Add Isolated Margin
        • Remove Isolated Margin
        • Get Cross Margin Risk Limit
        • Get Isolated Margin Risk Limit
        • Modify Isolated Margin Risk Limit
      • Funding Fees
        • Get Current Funding Rate.
        • Get Public Funding History
        • Get Private Funding History
    • Copy Trading
      • Introduction
      • Add Order
      • Add Order Test
      • Add Take Profit And Stop Loss Order
      • Cancel Order By OrderId
      • Cancel Order By ClientOid
      • Get Max Open Size
      • Get Max Withdraw Margin
      • Add Isolated Margin
      • Remove Isolated Margin
      • Modify Isolated Margin Risk Limit
      • Modify Isolated Margin Auto-Deposit Status
    • Earn
      • Purchase
      • Get Redeem Preview
      • Redeem
      • Get Savings Products
      • Get Promotion Products
      • Get Staking Products
      • Get KCS Staking Products
      • Get ETH Staking Products
      • Get Account Holding
    • VIP Lending
      • Introduction
      • Get Discount Rate Configs
      • Get Loan Info
      • Get Accounts
    • Affiliate
      • Introduction
      • Get Account
    • Broker
      • Introduction
      • Broker Application
      • Instructions
      • API Broker
        • Introduction
        • Get Broker Rebate
      • Exchange Broker
        • Introduction
        • Submit KYC
        • Get KYC Status
        • Get KYC Status List
        • Get Broker Info
        • Add sub-account
        • Get sub-account
        • Add sub-account API
        • Get sub-account API
        • Modify sub-account API
        • Delete sub-account API
        • Transfer
        • Get Transfer History
        • Get Deposit List
        • Get Deposit Detail
        • Get Withdraw Detail
        • Get Broker Rebate
  • Websocket API
    • Base Info
      • Introduction
      • Get Public Token - Spot/Margin
      • Get Private Token - Spot/Margin
      • Get Public Token - Futures
      • Get Private Token - Futures
    • Spot Trading
      • Public Channels
        • Ticker
        • All Tickers
        • Orderbook - Level1
        • Orderbook - Level5
        • Orderbook - Level50
        • Orderbook - Increment
        • Call Auction Orderbook - Level50
        • Call Auction Data
        • Klines
        • Trade
        • Symbol Snapshot
        • Market Snapshot
      • Private Channels
        • Order V2
        • Order V1
        • Balance
        • Stop Order
    • Margin Trading
      • Public Channels
        • Index Price
        • Mark Price
      • Private Channels
        • Cross Margin Position
        • Isolated Margin Position
    • Futures Trading
      • Public Channels
        • Ticker V2
        • Ticker V1
        • Orderbook - Level5
        • Orderbook - Level50
        • Orderbook- Increment
        • Klines
        • Trade
        • Instrument
        • Funding Fee Settlement
        • Symbol Snapshot
      • Private Channels
        • Orders
        • Balance
        • Positions
        • Margin Mode
        • Cross Margin Leverage
        • Stop Orders
  • Error Code
    • HTTP
    • Spot
    • Margin
    • Futures
    • Earn
    • Broker
    • CopyTrading
  • Abandoned Endpoints
    • Introduction
    • Account & Funding
      • Get sub-account List - Summary Info (V1)
      • Get sub-account List - Spot Balance (V1)
      • Get Deposit Addresses (V2)
      • Get Deposit Addresses - V1
      • Sub-account Transfer
      • Get Deposit History - Old
      • Internal Transfer
      • Get Futures Account Transfer Out Ledger
      • Get Withdrawal History - Old
      • Futures Account Transfer Out
      • Futures Account Transfer In
      • Add Deposit Address - V1
      • Withdraw - V1
    • Spot Trading
      • Orders
        • Add Order - Old
        • Add Order Test - Old
        • Batch Add Orders - Old
        • Cancel Order By OrderId - Old
        • Cancel Order By ClientOid - Old
        • Batch Cancel Order - Old
        • Get Orders List - Old
        • Get Recent Orders List - Old
        • Get Order By OrderId - Old
        • Get Order By ClientOid - Old
        • Get Trade History - Old
        • Get Recent Trade History - Old
    • Margin Trading
      • Get Account Detail - Margin
      • Add Order - V1
      • Add Order Test - V1
      • Get Account List - Isolated Margin - V1
      • Get Account Detail - Isolated Margin - V1
    • Futures Trading
      • Modify Isolated Margin Auto-Deposit Status
      • Cancel All Orders - V1
  • Developing
    • Introduction
    • Websocket API
      • Add Order
      • Cancel Order
    • Get Account
    • Get Transfer Quotas
    • Flex Transfer
    • Get Account Ledger
  1. REST
  2. Margin Trading
  3. Orders

Get Order By OrderId

GET
https://api.kucoin.com/api/v3/hf/margin/orders/{orderId}
domain:Spot
api-channel:Private
api-permission:General
api-rate-limit-pool:Spot
sdk-service:Margin
sdk-sub-service:Order
sdk-method-name:getOrderByOrderId
api-rate-limit-weight:5
Description
This endpoint can be used to obtain information for a single Margin order using the order ID.
After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.
Tips
If the order is not an active order, you can only get data within the time range of 7 * 24 hours (i.e.: from the current time to 7 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 7 * 24 hours by default.

Request

Path Params
orderId
string 
required
The unique order id generated by the trading system
Example:
671667306afcdb000723107f
Query Params
symbol
string 
required
symbol
Example:
BTC-USDT

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
curl --location --request GET 'https://api.kucoin.com/api/v3/hf/margin/orders/671667306afcdb000723107f?symbol=BTC-USDT'

Responses

🟢200OK
application/json
Body
code
string 
required
data
object 
required
id
string 
required
The unique order id generated by the trading system
symbol
string 
required
symbol
Examples:
BTC-USDTETH-USDTKCS-USDT
opType
string 
required
type
enum<string> 
required
Specify if the order is a 'limit' order or 'market' order.
Allowed values:
limitmarket
side
enum<string> 
required
Buy or sell
Allowed values:
buysell
price
string 
required
Order Price
size
string 
required
Order Size
funds
string 
required
Order Funds
dealSize
string 
required
Number of filled transactions
dealFunds
string 
required
Funds of filled transactions
fee
string 
required
Handling fees
feeCurrency
string 
required
Currency used to calculate trading fee
stp
enum<string> 
optional
Self Trade Prevention is divided into these strategies: CN, CO, CB , and DC
Allowed values:
DCCOCNCB
stop
string 
optional
stopTriggered
boolean 
required
stopPrice
string 
required
timeInForce
enum<string> 
required
Time in force
Allowed values:
GTCGTTIOCFOK
postOnly
boolean 
required
Whether it’s a postOnly order.
hidden
boolean 
required
Whether it’s a hidden order.
iceberg
boolean 
required
Whether it’s a iceberg order.
visibleSize
string 
required
Visible size of iceberg order in order book.
cancelAfter
integer 
required
A GTT timeInForce that expires in n seconds
channel
string 
required
clientOid
string 
required
Client Order Id, unique identifier created by the user
remark
string 
required
Order placement remarks
tags
string 
optional
Order tag
cancelExist
boolean 
required
Whether there is a cancellation record for the order.
createdAt
integer <int64>
required
lastUpdatedAt
integer <int64>
required
tradeType
string 
required
Trade type, redundancy param
inOrderBook
boolean 
required
Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook
cancelledSize
string 
required
Number of canceled transactions
cancelledFunds
string 
required
Funds of canceled transactions
remainSize
string 
required
Number of remain transactions
remainFunds
string 
required
Funds of remain transactions
tax
string 
required
Users in some regions have this field
active
boolean 
required
Order status: true-The status of the order is active; false-The status of the order is done
Example
{
  "code": "200000",
  "data": {
    "id": "671667306afcdb000723107f",
    "symbol": "BTC-USDT",
    "opType": "DEAL",
    "type": "limit",
    "side": "buy",
    "price": "50000",
    "size": "0.00001",
    "funds": "0.5",
    "dealSize": "0",
    "dealFunds": "0",
    "fee": "0",
    "feeCurrency": "USDT",
    "stp": null,
    "stop": null,
    "stopTriggered": false,
    "stopPrice": "0",
    "timeInForce": "GTC",
    "postOnly": false,
    "hidden": false,
    "iceberg": false,
    "visibleSize": "0",
    "cancelAfter": 0,
    "channel": "API",
    "clientOid": "5c52e11203aa677f33e493fb",
    "remark": null,
    "tags": null,
    "cancelExist": false,
    "createdAt": 1729521456248,
    "lastUpdatedAt": 1729651011877,
    "tradeType": "MARGIN_TRADE",
    "inOrderBook": true,
    "cancelledSize": "0",
    "cancelledFunds": "0",
    "remainSize": "0.00001",
    "remainFunds": "0.5",
    "tax": "0",
    "active": true
  }
}
Modified at about 1 month ago
Previous
Get Trade History
Next
Get Order By ClientOid