REST API
RESTful API is the easiest method to perform private queries to ByteX Exchange.
Public
Health
GET
https://api.bytex.ca/v2/health
This endpoint retrieves the exchange's basic information and checks its health.
Constants
GET
https://api.bytex.ca/v2/constants
This endpoint retrieves system information for coins and pairs.
Kit
GET
https://api.bytex.ca/v2/kit
This endpoint retrieves system kit configurations for the client.
Tiers
GET
https://api.bytex.ca/v2/tiers
This endpoint retrieves system tier levels for users.
Ticker
GET
https://api.bytex.ca/v2/ticker?symbol=${symbol}
This endpoint retrieves ticker information for a pair.
Path Parameters
symbol*
String
The currency pair symbol (xrp-usdt)
Tickers
GET
https://api.bytex.ca/v2/tickers
This endpoint retrieves ticker information for all pairs.
Orderbook
GET
https://api.bytex.ca/v2/orderbook?symbol=${symbol}
This endpoint retrieves 10 level bids and 10 level asks of the orderbook for a symbol.
Path Parameters
symbol*
String
The currency pair symbol (xrp-usdt, etc.)
Orderbooks
GET
https://api.bytex.ca/v2/orderbooks
This endpoint retrieves 10 level bids and 10 level asks of the orderbook for all symbols.
Trades
GET
https://api.bytex.ca/v2/trades
This endpoint retrieves the last 30 trades.
Path Parameters
symbol
String
The currency pair symbol (xrp-usdt, etc.)
Chart
GET
https://api.bytex.ca/v2/chart?symbol=${symbol}&resolution=${resolution}&from=${from}&to=${to}
This endpoint retrieves a trading pair's trade history HOLCV.
Path Parameters
symbol*
String
Symbol to get
resolution*
String
Time interval resolution (15, 60, 240, 1D, 1W)
from*
String
Beginning UNIX timestamp
to*
String
Ending UNIX timestamp
Charts
GET
https://api.bytex.ca/v2/charts?resolution=${resolution}&from=${from}to=${to}
This endpoint retrieves trade history HOLCV for all pairs.
Ex:
Path Parameters
resolution*
String
Time interval resolution (15, 60, 240, 1D, 1W)
from*
String
Beginning UNIX timestamp
to*
String
Ending UNIX timestamp
Private
Authentication
The string being encoded should follow the format ${METHOD}${PATH}${api-expires}
, where METHOD
is the HTTP method of the request, PATH
is the path of the request, and api-expires
is a unix timestamp indicating when the request expires. If the request includes a body, the JSON body object should be appended to the string being encoded e.g. ${METHOD}${PATH}${api-expires}${JSON_BODY}
.
Examples of strings being encoded:
GET
request tohttps://api.bytex.ca/v2/user/balance
that expires at1575516146
GET/v2/user/balance1575516146
POST
request tohttps://api.bytex.ca/v2/order
that expires at1575516146
with body{"symbol":"btc-usdt","side":"buy","size":0.001,"type":"market"}
POST/v2/order1583284849{"symbol":"btc-usdt","side":"buy","size":0.001,"type":"market"}
Example GET Request
Using the GET User request below, you can encode a string like this:
Insert the string you want to encode, followed by your
api-secret
and selectSHA256
for algorithmClick on Compute HMAC, and it will generate a computed HMAC; this will be your
api-signature
Once you've generated your api-signature
make the request in your shell, with the following code:
Get User
GET
https://api.bytex.ca/v2/user
This endpoint gets user's information, wallet address as well as his balance.
Get Balance
GET
https://api.bytex.ca/v2/user/balance
This endpoint gets a user's balance.
Get Deposits
GET
https://api.bytex.ca/v2/user/deposits
This endpoint displays user's deposits.
Path Parameters
order
String
asc or desc
order_by
String
Field to order data
address
String
Get deposits made to this address
limit
number
Number of elements to return. Default: 50. Maximum: 100
dismissed
boolean
Dismissed status of deposits to get
transaction_id
String
Get deposits with this transaction ID
page
number
Page of data to retrieve
status
boolean
Completed status of deposits to get
currency
String
The currency pair symbol
rejected
boolean
Rejected status of deposits to get
processing
boolean
Processing status of deposits to get
waiting
boolean
Waiting status of deposits to get
start_date
date-time
Starting date of queried data in ISO 8601 format
end_date
date-time
Ending date of queried data in ISO 8601 format
format
String
Pass value csv to download csv file
Get Withdrawals
GET
https://api.bytex.ca/v2/user/withdrawals
This endpoint displays user's withdrawals.
Path Parameters
currency
String
The currency pair symbol
limit
number
Number of elements to return. Default: 50. Maximum: 100
page
number
Page of data to retrieve
order_by
String
Field to order data
order
String
asc or desc
transaction_id
String
Get withdrawals with this transaction ID
address
String
Get withdrawals made to this address
status
boolean
Completed status of withdrawals to get
dismissed
boolean
Dismissed status of withdrawals to get
rejected
boolean
Rejected status of withdrawals to get
processing
boolean
Processing status of withdrawals to get
waiting
boolean
Waiting status of withdrawals to get
start_date
date-time
Starting date of queried data in ISO 8601 format
end_date
date-time
Ending date of queried data in ISO 8601 format
format
String
Pass value csv to download csv file
Get Withdrawal Fee
GET
https://api.bytex.ca/v2/user/withdrawal/fee?currency=${currency}
This endpoint gets the withdrawal fee for a certain currency.
Path Parameters
currency*
String
The desired currency e.g. xrp
Create Withdrawal Request
POST
https://api.bytex.ca/v2/user/request-withdrawal
This endpoint creates a withdrawal request for the user.
Path Parameters
currency
String
The desired currency e.g. xrp
amount
number
The amount to withdrawal e.g. 5
address
String
The recipient wallet's address
network
String
Network of currency being withdrawn if there are multiple networks for currency
otp_code
String
OTP for user if user has OTP enabled
Get Trades
GET
https://api.bytex.ca/v2/user/trades
This endpoint displays user's trades.
Path Parameters
symbol
String
The currency pair symbol
limit
number
Number of elements to return. Default: 50. Maximum: 100
page
numer
Page of data to retrieve
order
String
asc or desc
start_date
date-time
Starting date of queried data in ISO 8601 format
end_date
date-time
Ending date of queried data in ISO 8601 format
format
String
Pass value csv to download csv file
Get All Orders
GET
https://api.bytex.ca/v2/orders
This endpoint gets all active orders placed by the user.
Path Parameters
end_date
date-time
Ending date of queried data in ISO 8601 format
page
number
Page of data to retrieve
side
String
Side of orders to query (buy, sell)
order
String
asc or desc
open
boolean
Open status of order
limit
number
Number of elements to return. Default: 50. Maximum: 100
order_by
String
Field to order data
status
String
Status of order (filled, pfilled, canceled, new)
start_date
date-time
Starting date of queried data in ISO 8601 format
symbol
String
The currency pair symbol
Get Order
GET
https://api.bytex.ca/v2/order?order_id=${order_id}
This endpoint gets an order by its id.
Path Parameters
order_id*
String
Order unique Id
Create Order
POST
https://api.bytex.ca/v2/order
This endpoint places an order for the user.
Path Parameters
symbol*
String
The currency pair symbol (xrp-usdt)
side*
String
buy or sell order
type
String
limit or market order type
size*
number
The amount of the order
price*
number
*Only required if limit order*
Only should be used when type is limit.
stop
number
Stop price of order
meta
object
Object with other options such as post_only
Cancel All Orders
DELETE
https://api.bytex.ca/v2/order/all
This endpoint cancels all orders placed by the user.
Path Parameters
symbol
String
The currency pair symbol
Cancel Order
DELETE
https://api.bytex.ca/v2/order?order_id=${order_id}
This endpoint cancels an order by getting its id.
Path Parameters
order_id*
String
Specific order unique Id
Last updated
Was this helpful?