đSpot
Public
Test Connectivity
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/ping
Description:
This endpoint checks connectivity to the host.
Response:
200: OK
- Connection normal
Check Server Time
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/time
Description:
This endpoint checks connectivity to the server and retrieves server timestamp.
Response:
200: OK
- Successfully retrieved server time
Pairs List
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/symbols
Description:
Retrieve a list of trading pairs.
Response:
200: OK
Response Fields
symbol: string - Name of the symbol (e.g., BTCUSDT)
baseAsset: string - Underlying asset for the symbol (e.g., BTC)
quoteAsset: string - Quote asset for the symbol (e.g., USDT)
pricePrecision: integer - Precision of the price
quantityPrecision: integer - Precision of the quantity
Market
Depth
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/depth
Description:
Retrieve market depth data.
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
limit: integer (default 100; max 100)
Response:
200: OK
- Successfully retrieved market depth data
Response Fields
time: long - Current timestamp (ms)
bids: list - List of all bids, best bids first
asks: list - List of all asks, best asks first
24hrs Ticker
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/ticker
Description:
Retrieve 24-hour price change statistics.
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
Response:
200: OK
- Successfully retrieved ticker data
Response Fields
time: long - Open Time
high: float - High Price
low: float - Low Price
open: float - Open Price
last: float - Last Price
vol: float - Trade Volume
rose: float - Price increase or Price rise
Recent Trades List
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/trades
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
limit: string (default 100; max 1000)
Response:
200: OK
Response Fields
price: float - The price of the trade
time: long - Current timestamp (ms)
qty: float - The quantity traded
side: string - BUY/SELL (Taker side)
Kline/Candlestick Data
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/klines
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
interval: string (required) - Interval of the Kline. Possible values include: 1min, 5min, 15min, 30min, 60min, 1day, 1week, 1month
startTime: long - Start time (e.g., 1538728740000)
endTime: long - End time (e.g., 1538728740000)
limit: string (default 100; max 300)
Response:
200: OK
Response Fields
idx: long - Open time
open: float - Open price
close: float - Close price
high: float - High price
low: float - Low price
vol: float - Volume
Trade
New Order
Endpoint:
POST https://openapi.fokawa.com/sapi/v1/order
Rate Limit:
100 times/2s
Headers:
X-CH-SIGN: string - Sign
X-CH-APIKEY: string - Your API-key
X-CH-TS: integer - Timestamp
Request Body:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
volume: number (required) - Order volume. For MARKET BUY orders, volume = amount.
side: string (required) - Side of the order, BUY/SELL
type: string (required) - Type of the order, LIMIT/MARKET
price: number - Order price, REQUIRED for LIMIT orders
newClientOrderId: string - Unique order ID generated by users to mark their orders
recvwindow: integer - Time window
Response:
200: OK
- Successfully posted new order
Response Fields
orderId: long - ID of the order
clientorderId: string - Unique ID of the order
symbol: string - Symbol Name (e.g., BTCUSDT)
transactTime:
integer - Time the order is placed
price: float - Order price
origQty: float - Quantity ordered
executedQty: float - Quantity of orders that have been executed
type: string - Order type (LIMIT, MARKET)
side: string - Order side (BUY, SELL)
status: string - Order status (NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED)
Test New Order
Endpoint:
POST https://openapi.fokawa.com/sapi/v1/order/test
Description:
Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Request Body:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
volume: number (required) - Order volume. For MARKET BUY orders, volume = amount.
side: string (required) - Side of the order, BUY/SELL
type: string (required) - Type of the order, LIMIT/MARKET
price: number - Order price, REQUIRED for LIMIT orders
recvwindow: integer - Time window
newClientOrderId: string - Unique order ID generated by users to mark their orders
Response:
200: OK
- Successfully tested new order
Batch Orders
Endpoint:
POST https://openapi.fokawa.com/sapi/v1/batchOrders
Description:
Batch contains at most 10 orders.
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Request Body:
orders: number - The batch order information can contain a maximum of 10 records
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
Response:
200: OK
Request Fields
price: float - Price
volume: float - Quantity
side: string - BUY/SELL (Direction)
batchType: string - LIMIT/MARKET (Type)
idsString: string - Collection of order numbers of type String
ids: integer - Collection of order numbers
Query Order
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/order
Query Parameters:
orderId: string (required) - Order ID
newClientOrderId: string - Client Order Id, Unique order ID generated by users to mark their orders (e.g., 354444heihieddada)
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Response:
200: OK
Response Fields
orderId: long - Order ID (system generated)
clientOrderId: string - Order ID (sent by yourself)
symbol: string - Currency Pair Name
price: float - Order Price
origQty: float - Number of orders
executedQty: float - Number of orders already filled
avgPrice: float - Average price of filled orders
type: string - Order type (LIMIT, MARKET)
side: string - Order direction (BUY, SELL)
status: string - Order status (NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED)
transactTime: string - Order Creation Time
Cancel Order
Endpoint:
POST https://openapi.fokawa.com/sapi/v1/cancel
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Request Body:
newClientOrderId: string - Client Order Id, Unique order ID generated by users to mark their orders (e.g., 354444heihieddada)
orderId: string (required) - Order ID
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
Response:
200: OK
Response Fields
orderId: long - ID of the order
clientOrderId: string - Unique ID of the order
symbol: string - Name of the symbol
status: string - The state of the order (NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED)
Batch Cancel Orders
Endpoint:
POST https://openapi.fokawa.com/sapi/v1/batchCancel
Description:
Batch contains at most 10 orders.
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Request Body:
orderIds: string - Order ID collection [123,456]
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
Response:
200: OK
Current Open Orders
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/openOrders
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTCUSDT)
limit: string (default 100; max 1000)
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Response:
200: OK
Response Fields
orderId: long - ID of the order
orderIdString: string - Character String Type Order ID (Recommended)
clientOrderId: string - Unique ID of the order
symbol: string - Name of the symbol
price: float - Price of the order
origQty: float - Quantity ordered
executedQty: float - Quantity of orders that have been executed
avgPrice: float - Average price of filled orders
type: string - Order type (LIMIT, MARKET)
side: string - Order side (BUY, SELL)
status: string - Order status (NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED)
time: string - Creation Time
Trades
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/myTrades
Query Parameters:
symbol: string (required) - Symbol Name (e.g., BTC
USDT)
limit: string (default 100; max 1000)
fromId: string - Trade Id to fetch from
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Response:
200: OK
Response Fields
symbol: string - Name of the symbol (e.g., BTCUSDT)
id: integer - Trade ID
bidId: long - Bid Order ID
askId: long - Ask Order ID
price: float - Price of the trade
qty: float - Quantity of the trade
time: long - Timestamp of the trade
isBuyer: bool - true = Buyer, false = Seller
isMaker: bool - true = Maker, false = Taker
feeCoin: string - Trading fee coin
fee: float - Trading fee
bidUserId: long - Buyer UID
askUserId: long - Seller UID
isSelf: bool - true = Self-dealt
Account
Account Information
Endpoint:
GET https://openapi.fokawa.com/sapi/v1/account
Headers:
X-CH-APIKEY: string - Your API-key
X-CH-TS: string - Timestamp
X-CH-SIGN: string - Sign
Response:
200: OK
- Successfully retrieved account information
Response Fields
balances: list - Show balance details
asset: string - Name of the asset (e.g., USDT)
free: float - Amount available for use
locked: float - Amount locked (for open orders)
Last updated