Reference

Get Fund Details

URL

GET https://www.btron.com/api/fund/user_funds/overview/

Response Payload Details

The payload in the response is a JSON object with three members, “main”, “wealth_mgmt” and “otc”, represeting the details of your main account, your wealth management account and your OTC account respectively. Each member’s value is an object of which keys are the asset symbols and the value is the details of that asset.

For the main account:

Key Type Description
available float Available amount of that asset
trade_frozen float Frozen amount of that asset for trade
withdraw_frozen float Frozen amount of that asset which are being withdrawn

For the wealth_mgmt account:

Key Type Description
term float Amount that subscribing a wealth mgmt plan
current float Amount put in the current plan (a.k.a 小金库)

For the otc account:

Key Type Description
available float Available amount of that asset in the OTC account
frozen float Frozen amount of ongoing OTC orders

Get Products

URL

GET https://www.btron.com/v2.0/api/trade/products/

Response Payload Details

The payload in the response is a JSON object with only ONE member. Of which the key is a fixed string “products”, its value is an array. Each element in the array is a JSON object representing a tradable product.

Key Type Description
product string Product’s name
product_uuid uuid Product’s uuid
exchanges list A list of available exchange, with name and uuid
maker_fee_rate float Fee rate of order maker
taker_fee_rate float Fee rate of order taker
min_quantity float Minimum order quantity, by quote asset
max_quantity float Maximum order quantity, by quote asset
min_amount float Minimum order amount, by base asset
max_amount float Maximum order amount, by base asset
minimum_volume float Resolution(minimum change) of the order volume

Get Exchanges

Get Tickers

URL

GET https://www.btron.com/v2.0/api/trade/tickers/?products=:PRODUCTS&detailed=:DETAILED

Request Params

Key Type Required Description
products list Yes

A list of products, seperated by commas. Each is in the format of EXCHANGE:PRODUCT.

Example: products=btron:Q/USDT,binance:BTC/USDT

detailed boolean No Whether to return 24hr high and low (i.e., detailed info) in the response. Defaults to False.

Response Payload Details

The payload in the response is a JSON object with only ONE member. Of which the key is a fixed string “tickers”, its value is a JSON object. Each member in this JSON object represents respective ticker info of every exchange-product combination.

Key Type Description
tid integer Trade id
timestamp float Timestamp of the most recent deal
open float Open price
last float Price of the most recent deal
volume float 24hrs volume
amount float 24hrs amount
low float 24hrs lowest price, available if the param detailed is set to True in the request
high float 24hrs highest price, available if the param detailed is set to True in the request

Note

Tickers on Btron DO NOT return timestamp.

Get Recent Trades

URL

GET https://www.btron.com/v2.0/api/trade/trades/?product=:PRODUCT&limit=:LIMIT&since=:SINCE&marker=:MARKER

Request Params

Key Type Required Description
product string Yes Product in the format of EXCHANGE:PRODUCT, recent trades info of which to get
limit integer No Max number of recent trades info to get
since integer No A timestamp, trades info after which to get
marker integer No A timestamp, trades info before which to get

Response Payload Details

The payload in the response is a JSON object with only ONE member. Of which the key is a fixed string “trades”, its value is a JSON array. Each element in the array is a JSON object representing a deal info.

Key Type Description
tid integer Trade id
timestamp float Timestamp of the trade
price float Price of the trade
volume float Volume of the trade
type string buy or sell, represents the direction of the trade

Get Depth

URL

GET https://www.btron.com/v2.0/api/trade/depth/?product=:PRODUCT

Request Params

Key Type Required Description
product string Yes Product in the format of EXCHANGE:PRODUCT, order book of which to get

Response Payload Details

The payload in the response is a JSON object with only ONE member. Of which the key is a fixed string “depth”, its value is a JSON object with two members, keys are respectively buys and sells.

Key Type Description
buys JSON object price-volume mapping of the bid-side order book. Sorted descendingly by price
sells JSON object price-volume mapping of the ask-side order book. Sorted ascendingly by price

Get Orders

URL

GET https://www.btron.com/v2.0/api/trade/orders/?status=:STATUS&product=:PRODUCT&exchange=:EXCHANGE&limit=:LIMIT&marker=:MARKER

Request Params

Key Type Required Description
status string Yes Order status, one of OPEN, EXECUTED or CANCELLED
product uuid No UUID of the product, return orders of all products on that exchange when not specified
exchange uuid No UUID of the exchange, defaults to Btron’s uuid
limit integer No Max number of orders to get
marker uuid/integer No an ID or uuid, orders before which to return, see the now below for more details

Note

  • Status is a required param, the API only returns orders of that status
  • Only orders on a single exchange can be queried at once
  • The marker param differs for Btron & 3rd party exchanges, use an order ID on Btron, UUID on 3rd party exchanges

Response Payload Details

The payload in the response is a JSON object containing two members. The orders member is an array, each element in it represents an order.

Key Type Description
id integer Order’s ID
uuid uuid Order’s UUID
product string Product of the order
product_uuid uuid Product uuid of the order
type string Order’s type, BUY or SELL
market boolean Whether the order is a market order
price float Price of the placed order
avg_price float Average price of the order
volume float Volume of the placed order
dealt_volume float Dealt volume of the order
amount float Amount of the placed order
dealt_amount float Dealt amount of the order
is_cancelled boolean Whether the order is cancelled
is_live boolean Whether the order is open (i.e. neither dealt nor cancelled)
timestamp string Timestamp when the order is created
fee float Fee
fee_discount float Fee discount
exchange string Exchange where the order is placed
exchange_uuid uuid Exchange’s UUID

The more member is a boolean value, representing where there are more orders not returned in this request.

Note

If more is True, you can request again with the marker param set to the last returned order’s ID/UUID to obtain more orders.

New Buy Limited Order

URL

POST https://www.btron.com/v2.0/api/trade/buy_limited/

Request Params

Key Type Required Description
product uuid Yes UUID of the product
exchange uuid No UUID of the exchange, defaults to Btron’s uuid
price float Yes Requested order price
volume float Yes Requested order volume

Response Payload Details

The payload in the response is a JSON object representing newly placed order. Members in this JSON object are the same with Get Orders response.

New Sell Limited Order

URL

POST https://www.btron.com/v2.0/api/trade/sell_limited/

Request Params

Key Type Required Description
product uuid Yes UUID of the product
exchange uuid No UUID of the exchange, defaults to Btron’s uuid
price float Yes Requested order price
volume float Yes Requested order volume

Response Payload Details

The payload in the response is a JSON object representing newly placed order. Members in this JSON object are the same with Get Orders response.

New Buy Market Order

URL

POST https://www.btron.com/v2.0/api/trade/buy_market/

Request Params

Key Type Required Description
product uuid Yes UUID of the product
exchange uuid No UUID of the exchange, defaults to Btron’s uuid
amount float Yes Requested order amount, by quote asset

Response Payload Details

The payload in the response is a JSON object representing newly placed order. Members in this JSON object are the same with Get Orders response.

New Sell Market Order

URL

POST https://www.btcon.vom/v2.0/api/trade/sell_market/

Request Params

Key Type Required Description
product uuid Yes UUID of the product
exchange uuid No UUID of the exchange, defaults to Btron’s uuid
volume float Yes Requested order volume, by base asset

Response Payload Details

The payload in the response is a JSON object representing newly placed order. Members in this JSON object are the same with Get Orders response.

Cancel Orders

URL

POST https://www.btron.com/v2.0/api/trade/cancel/

Request Params

Key Type Required Description
orders array Yes An array of order UUIDs to be cancelled

Response Payload Details

The payload in the response is a JSON object with three members, cancelling, not_found and failed.

Key Type Description
cancelling array Array of UUIDs of orders which are being cancelled
not_found array Array or UUIDs that cannot be found
failed array Array of UUIDs of orders which are failed to be cancelled, they might be already executed or already cancelled