coinbene-spot-rest Spot openapi rest interface description

 

coinbene-spot-rest Spot openapi rest interface descriptionBasic Informationrestriction of visitInterface TypeSignatureWebSocket SpecificationInterface SpecificationPublic Interface - Get all Tickers and all Market pairs configuration informationPublic Interface - Get all asset configuration informationPublic Interface - Get all ticker configuration informationPublic Interface - Get order book for a given market pair informationPublic Interface - Get trades for a given market pair informationPublic Interface - Get candles Data InformationPublic Interface - Get trade history list informationPrivate Interface - Query all account informationPrivate Interface - Query specified account asset informationPrivate Interface - OrderPrivate Interface - Batch OrderPrivate Interface - Query the current list of delegate ordersPrivate Interface - Query History Order ListPrivate Interface - Query specified order informationPrivate Interface - Query Order Transactions ListPrivate Interface - Undo the specified orderPrivate Interface - Bulk Revocation OrderError Code Summary

 

Basic Information

restriction of visit

Interface Type

Signature

All interface request headers must contain the following:

ACCESS-SIGN value generation rules:

Sample interface request:

 

WebSocket Specification

WebSocket Interface Specification

 

 

Interface Specification

Public Interface - Get all Tickers and all Market pairs configuration information

Request parameters: no

Return field description:

NameTypeDescriptionstatus
trading_pairsstringIdentifier of a ticker with delimiter to separate base/quote, eg. BTC-USDT (Price of BTC is quoted in USDT)Mandatory
last_pricestringLast transacted price of base currency based on given quote currencyMandatory
lowest_askstringLowest Ask price of base currency based on given quote currencyMandatory
highest_bidstringHighest bid price of base currency based on given quote currencyMandatory
base_volumestring24-hr volume of market pair denoted in BASE currencyMandatory
quote_volumestring24-hr volume of market pair denoted in QUOTE currencyMandatory
price_change_percent_24hstring24-hr % price change of market pairMandatory
highest_price_24hstringHighest price of base currency based on given quote currency in the last 24-hrsMandatory
lowest_price_24hstringLowest price of base currency based on given quote currency in the last 24-hrsMandatory
base_currencystringSymbol/currency code of base currency, eg. BTCMandatory
quote_currencystringSymbol/currency code of quote currency, eg. USDTMandatory

Public Interface - Get all asset configuration information

Request parameters: no

Return field description:

NameTypeDescriptionstatus
namestringFull name of cryptocurrencyMandatory
can_withdrawstringIdentifies whether withdrawals are enabled or disabled.Mandatory
can_depositstringIdentifies whether deposits are enabled or disabled.Mandatory
min_withdrawstringIdentifies the single minimum withdrawal amount of a cryptocurrency.Recommended
max_withdrawstringIdentifies the single maximum withdrawal amount of a cryptocurrency.Recommended
maker_feestringFees applied when liquidity is added to the order book.Recommended
taker_feestringFees applied when liquidity is removed from the order book.Recommended
unified_cryptoasset_idstringUnique ID of cryptocurrency assigned byMandatory

Public Interface - Get all ticker configuration information

Request parameters: no

Return field description:

NameTypeDescriptionstatus
base_idstringThe quote pair [Unified Cryptoasset ID].Mandatory
quote_idstringThe base pair [Unified Cryptoasset ID]Mandatory
last_pricestringLast transacted price of base currency based on given quote currencyMandatory
base_volumestring24-hour trading volume denoted in BASE currencyMandatory
quote_volumestring24 hour trading volume denoted in QUOTE currencyMandatory
isFrozenstringIndicates if the market is currently enabled (0) or disabled (1).Mandatory

Public Interface - Get order book for a given market pair information

Request parameters:

NameTypeDescripitonStatus
market_pairstringA pair such as “BTC_USDT”Mandatory

Return field description:

NameTypeDescriptionstatus
timestampstringUnix timestamp in milliseconds for when the last updated time occurred.Mandatory
bidsstringAn array containing 2 elements. The offer price and quantity for each bid order.Mandatory
asksstringAn array containing 2 elements. The ask price and quantity for each ask order.Mandatory

Public Interface - Get trades for a given market pair information

Request parameters:

NameTypeDescripitonStatus
market_pairstringA pair such as “BTC_USDT”Mandatory

Return field description:

NameTypeDescriptionstatus
trade_idstringA unique ID associated with the trade for the currency pair transaction. Note: Unix timestamp does not qualify as trade_id.Mandatory
pricestringLast transacted price of base currency based on given quote currencyMandatory
base_volumestringTransaction amount in BASE currency.Mandatory
quote_volumestringTransaction amount in QUOTE currency.Mandatory
timestampstringUnix timestamp in milliseconds for when the transaction occurred.Mandatory
typestringUsed to determine whether or not the transaction originated as a buy or sell.Mandatory

Public Interface - Get candles Data Information

Request parameters:

NameTypeStatusDescription
symbolstringMandatoryThe name of the currency pair, such as BTC_USDT
periodstringMandatorytime period, values are as follows ["1", "3", "5", "15", "30", "60", "120", "240", "360", "720 "," D "," W "," M "], which correspond to [1min, 3min, 5min, 15min, 30min, 1hour, 2hour, 4hour, 6hour, 12hour, 1day, 1week, 1month]
startstringRecommendedSpecify the start time of the kline line, timestamp accurate to the second
endstringRecommendedSpecify kline line end time, timestamp accurate to seconds

Public Interface - Get trade history list information

Request parameters:

NameTypeDescripitonStatus
tradeTimestringGMT+8 timezoneMandatory

Return field description:

NameTypeDescriptionstatus
marketPairstringA unique ID associated with the trade for the currency pair transactionMandatory
pricestringLast transacted price of base currency based on given quote currencyMandatory
directionstringtrade direciton, such as "buy" or "sell"Mandatory
quantitystringTransaction quantity.Mandatory
tradeTimestringUnix timestamp in milliseconds for trade.Mandatory

Private Interface - Query all account information

Request parameter no

Return result parameter

NameTypeDescription
assetstringasset name
availablestringavailable balance
frozenBalancestringFreeze balance
totalBalancestringtotal

Private Interface - Query specified account asset information

Request parameter

NameTypeRequiredDescription
assetstringyesasset name/abbreviation, such as BTC

Return result parameter

NameTypeDescription
assetstringasset name
availablestringavailable balance
frozenBalancestringFreeze balance
totalBalancestringtotal, freeze + balance

Private Interface - Order

Request parameters:

NameTypeRequiredDescription
symbolstringyescurrency pair name, such as BTC/USDT
directionstringyesdirection, 1: buy 2: sell
pricestringyesorder price, Market Order Type Assignment 0
quantitystringyesQuantity of limit order entrusted, quantity of market order sold, Market order when buying is value 0
orderTypestringyes1: Limit 2: Market 8:postOnly 9:fok 10:ios
notionalstringnoMarket Order Purchase Amount
clientIdstringnouser request id, transparently returned to the user

Return field description:

NameTypeDescription
orderIdstringgenerated order id
clientIdstringclientId requested by client

Private Interface - Batch Order

Request parameters: The request parameter is an array object containing the following parameters

NameTypeRequiredDescription
symbolstringyescurrency pair name, such as BTC/USDT
directionstringyesdirection, 1: buy 2: sell
pricestringyesorder price,Market Order Type Assignment 0
quantitystringyesQuantity of limit order entrusted, quantity of market order sold,Market order when buying is value 0
orderTypestringyes1: Limit price 2: Market price
notionalstringnoMarket Order Purchase Amount
clientIdstringnouser request id, transparently returned to the user

Return field description:

NameTypeDescription
orderIdstringgenerated order id
clientIdstringclientId requested by client

 

Private Interface - Query the current list of delegate orders

Request parameters:

NameTypeRequiredDescription
symbolstringnocurrency pair name, such as BTC/USDT
latestOrderIdstringNoOrder id, used by page, the default value is empty, return the latest 20 data, displayed in reverse order by order id. Get the last order id-1, take the next page of data

Return field description:

NameTypeDescription
orderIdstringOrder Id
baseAssetstringTrading currency BTC
quoteAssetstringpricing Currency USDT
orderDirectionstringdirection
quantitystringorder quantity
fillQuantitystringNumber of transactions
amountstringorder amount
filledAmountstring 
avgPricestringAverage price
orderPricestringorder price
orderStatusstringOrder status, unfilled: Open Completed: Filled Cancel: Canceled Partial deal: Partially cancelled
orderTimestringOrder time
feestringhandling fee

Private Interface - Query History Order List

Request parameters:

NameTypeRequiredDescription
symbolstringnocurrency pair name, such as BTC/USDT
latestOrderIdstringNoOrder id, used by page, the default value is empty, return the latest 20 data, displayed in reverse order by order id. Get the last order id-1, take the next page of data

Return field description:

NameTypeDescription
orderIdstringOrder Id
baseAssetstringTrading currency BTC
quoteAssetstringpricing Currency USDT
orderDirectionstringdirection
quantitystringorder quantity
amountstringorder amount
filledAmountstring 
takerFeeRatestringtaker rate
makerFeeRatestringmaker rate
avgPricestringAverage price
orderPricestringorder price
orderStatusstringOrder status, unfilled: Open Completed: Filled Cancel: Canceled Partial deal: Partially cancelled
orderTimestringOrder time
totalFeestringhandling fee

Private Interface - Query specified order information

Request parameters:

NameTypeRequiredDescription
orderIdstringyesorder ID

Return field description:

NameTypeDescription
orderIdstringOrder Id
baseAssetstringTrading currency BTC
quoteAssetstringpricing Currency USDT
orderDirectionstringDirection
quantitystringorder quantity
amountstringorder amount
filledAmountstring 
takerFeeRatestringtaker rate
makerFeeRatestringmaker rate
avgPricestringAverage price
orderPricestringorder price
orderStatusstringOrder status, unfilled: Open Completed: Filled Cancel: Canceled Partial deal: Partially cancelled
orderTimestringOrder time
totalFeestringhandling fee

Private Interface - Query Order Transactions List

Request parameters:

NameTypeRequiredDescription
orderIdstringyesorder ID

Return field description:

NameTypeDescription
pricestringtransaction price
quantitystringNumber of transactions
amountstringtransaction amount
feestringhandling fee
directionstringdirection
tradeTimestringOrder trading time, international time
feeByConistringconi deduction

 

Private Interface - Undo the specified order

Request parameters:

NameTypeRequiredDescription
orderIdstringyesorder ID

Return field description:

NameTypeDescription
datastringUndo Order Id

Private Interface - Bulk Revocation Order

Request parameters:

NameTypeRequiredDescription
orderIdslistYesOrder ID

Return field description:

NameTypeDescription
datastringUndo Order Id

Error Code Summary

Error codemessage
429Requests are too frequent
430API user transactions are not supported at this time
10001"ACCESS_KEY" cannot be empty
10002"ACCESS_SIGN" cannot be empty
10003"ACCESS_TIMESTAMP" cannot be empty
10005Invalid ACCESS_TIMESTAMP
10006Invalid ACCESS_KEY
10007Invalid Content_Type, please use "application / json" format
10008Request timestamp expired
10009System Error
10010API authentication failed
11000Required parameter cannot be empty
11001Incorrect parameter value
11002Parameter value exceeds maximum limit
11003No data returned by third-party interface
11004Order price accuracy does not match
11005The currency pair has not yet opened leverage
11007Currency pair does not match asset
51800The transaction has been traded, failure
51801The order does not exist, the cancellation of failure
51802TradePair Wrong
51803Buy Price must not be more than current price {0}%
51804Sell price must not be less than current price {0}%
51805Order price Most decimal point {0}
51806Order quantity Most decimal point {0}
51807Buy at least {0}
51808Sell at least {0}
51809Insufficient balance or account is frozen
51810selling not supported
51811Sorry, you do not have the authority to trade.
51812The buy price exceeds the limit of {1} within current {0}-hour cycle. Please adjust the price.
51813The sell price exceeds the limit of {1} within current {0}-hour cycle. Please adjust the price.
51814Schedule Order can only be cancelled before triggering
51815Order Type Error
51816Account Type Error
51817Trade Pair Error
51818Trade Orientation Error
51819Order Interface Error
51820Trigger Price Error
51821Trigger price Most decimal point {0}
51822Purchase price shall not be higher than trigger price {0}%
51823Selling Price shall not be under Trigger Price{0}%
51824Order Price Error
51825Order Amount Error
51826Order amount Most decimal point {0}
51827Order Quantity Error
51828Quantity of senior open order can not exceed {0}
51829Trigger price shall be higher than the latest filled price
51830Trigger price shall be lower than the latest filled price
51831Limited Price Error
51832Limited price Most decimal point {0}
51833Limited price shall be higher than the latest filled price
51834Limited price shall be lower than the latest filled price
51835Account not found
51836Order does not exist
51837Order Number Error
51838Quantity of batch ordering can not exceed {0}
51839Account freezing failed
51840Account checking failed
51841Trade pair have no settings of price limit
51842Showing Quantity of Iceberg Order shall be greater than 0
51843Price limit checking failed
51844Start time error
51845End time error
51846Start time should be earlier than end time
51847Maximum download time period is {0} days
51848Purchase Price shall not be under Trigger Price {0}%
51849Selling price can not be higher than trigger price {0}%
51850The maximum number of download tasks is {0}
51851Start time: Only a specific time of the past 3 months is available