Tapbit spot openapi rest interface

Basic Information

Access Restriction Instructions

Interface Type

Signature method

All interface request headers must contain the following:

Value generation rules for ACCESS-SIGN:

Sample interface request:

Interface specification

Public interface - Get currency pair list

Request parameters: None

Return field description:

NameTypeDescription 
trade_pair_namestringcurrency pair name, such as BTC/USDT 
base_assetstringunderlying assets, such as BTC 
quote_assetstringvaluation assets, such as USDT 
price_precisionstringprice precision 
amount_precisionstringquantity precision 
taker_fee_ratestringtaker 
maker_fee_ratestringmaker 
min_amountstringminimum number of delegates 
price_fluctuationstringprice fluctuation limit 
min_notionalstring  

Public interface - Single currency pair information

Request parameters:

NameTypeRequiredDescription
instrument_idstringyescurrency pair name, such as BTC/USDT

Return field description:

NameTypeDescription
trade_pair_namestringcurrency pair name, such as BTC/USDT
base_assetstringunderlying assets, such as BTC
quote_assetstringvaluation assets, such as USDT
price_precisionstringprice precision
amount_precisionstringquantity precision
taker_fee_ratestringtaker rate
maker_fee_ratestringmaker rate
min_amountstringminimum number of delegates
price_luctuationstringprice fluctuation limit
min_notionalstring 

Public interface - Depth

Request parameters:

NameTypeRequiredDescription
instrument_idstringyesis the name of a currency pair, such as BTC/USDT
depthstringyesis the depth gear with values of 5, 10, 50 and 100

Return field description:

NameTypeDescription
askarraySeller depth, [price, quantity]
bidarrayBuyer depth, [price, quantity]
timestampstringutc timestamp

Public interface - Get ticker list information

Request parameters: None

Return field description:

NameTypeDescription
trade_ pair_namestringcurrency pair name, such as BTC/USDT
last_ pricestringlatest price
lowest_ askstringone price
highest_ bidstringbuy a price
highest_ price_24hstring24h highest price
lowest_ price_24hstring24h lowest price
volume24hstring24h trading volume
chg24hstring24h price change rate
chg0hstring0h price change rate
amount24hstring24h trading volume

Public interface - Get the specified ticker information

Request parameters:

NameTypeRequiredDescription
instrument_idstringyesis the name of a currency pair, such as BTC/USDT

Return field description:

field nametypedescription
trade_ pair_namestringcoin pair name
last_pricestringlatest price
lowest_askstringone price
highest_bidstringbuy a price
highest_ price_24hstring24h highest price
lowest_ price_24hstring24h lowest price
volume24hstring24h trading volume
chg24hstring24h price change rate
chg0hstring0h price change rate
amount24hstring24h trading volume

Public interface - Get K-line data

Request parameters:

NameTypeRequiredDescription 
instrument_idstringyescurrency pair, such as BTC/USDT 
start_timestringNois the start time, and the iso8601 format timestamp is seconds 
end_timestringNois the deadline. The iso8601 format timestamp is seconds 
periodstringyesKline. Please refer to the description for the value range 

Public interface - Get the latest trade list information

Request parameters:

NameTypeRequiredDescription
instrument_idstringyesis the name of a currency pair, such as BTC/USDT

Return field description:

Private interface - Get all account information

Request parameter: None

Return result parameters:

Nametypedescription
assetstringasset name
availablestringavailable balance
frozen_balancestringfreeze balance
total_balancestringtotal balance,include freezes balance

Private interface - Get asset information of specified account

Request parameters

NameTypeRequiredDescription
assetstringyesis the name / abbreviation of an asset, such as USDT

Return result parameters

Nametypedescription
assetstringasset name / abbreviation
availablestringavailable balance
frozen_balancestringfreeze balance
total_balancestringtotal, frozen + balance

Private interface - Place order

Request parameters:

NameTypeRequiredDescription
instrument_idstringyescurrency pair, such as BTC/USDT
directionstringyesis the direction, direction = 1: buy, direction = 2: sell
pricestringyesis the order price
quantitystringyesis the entrusted quantity

Return field description:

NameTypeDescription
order_idstringgenerated order ID

Private interface - Batch place order

The request parameter is an array object that contains the following parameters

NameTypeRequiredDescription
instrument_idstringyescurrency pair, such as BTC/USDT
directionstringyesorder direction = 1 means buy direction = 2 means sell direction
pricestringyesis the order price
quantitystringyesis the entrusted quantity

Return field description:

Nametypedescription
order_idstringgenerated order ID

Private interface - Get the list of the current delegated orders

Request parameters:

NameTypeRequiredDescription
instrument_idstringyesis the name of a currency pair, such as BTC/USDT
next_order_idstringnoorder ID, which is used in pagination. The default value is empty. The latest 20 pieces of data are returned and displayed in reverse order by order ID. Get the last order Id-1, take the next page of data

Return field description:

NameTypeDescription
order_idstringorder ID
base_assetstringtransaction currency, such as BTC
quote_assetstringvaluation currency, such as USDT
directionstringsingle direction
quantitystringorder quantity
filled_quantitystringnumber of transactions
amountstringorder amount
filled_amountstringtransaction amount
trade_pair_namestringcoin pair name
pricestringorder price
statusstringorder status, unsettled: open, complete, cancelled, partially cancelled
order_timestringorder time
feestringhandling fee
taker_fee_ratestringtaker
taker_fee_ratestringmaker

Private interface - Get historical delegation list

Request parameters:

NameTypeRequiredDescription
instrument_idstringyesis the name of a currency pair, such as BTC/USDT
next_order_idstringnoorder ID, which is used in pagination. The default value is empty. The latest 20 pieces of data are returned and displayed in reverse order by order ID. Get the last order Id-1, take the next page of data

Return field description:

Nametypedescription
order_idstringorder ID
base_assetstringtransaction currency, such as BTC
quote_assetstringvaluation currency, such as usdt
directionstringsingle direction
quantitystringorder quantity
filled_quantitystringnumber of transactions
amountstringorder amount
filled_amountstringtransaction amount
trade_pair_namestringcoin pair name
pricestringorder price
statusstringorder status unsettled: Open, Filled, Cancelled, Partially cancelled
order_timestringorder time
feestringhandling fee
taker_fee_ratestringtaker
taker_fee_ratestringmaker

 

Private interface - Get specified order information

Request parameters:

NameTypeRequiredDescription
order_idstringyesis the order ID

Return field description:

NameTypeDescription
order_idstringorder ID
base_ assetstringtransaction currency, such as BTC
quote_assetstringvaluation currency, such as usdt
directionstringsingle direction
quantitystringorder quantity
amountstringorder amount
filled_amountstringtransaction amount
taker_fee_ratestringtaker
maker_fee_ratestringmaker
order_typestringorder type limit indicates price limit order
pricestringorder price
statusstringorder status, unsettled: open, complete, cancelled, partially cancelled
order_timestringorder time
feestringhandling fee
trade_pair_namestringcoin pair name

Private interface - Cancel specified order

Request parameters:

NameTypeRequiredDescription
order_idstringyesis the order ID

Return field description:

NameTypeDescription
order_idstringcancelled order ID

 

Private interface - Batch Cancel specified orders

Request parameters:

NameTypeRequiredDescription
orderIdslistyesis the order ID

Return field description:

NameTypeDescription
order_idstringcancelled order ID