HTTP API
All endpoints use HTTP GET requests with several URL parameters. All responses are encoded in JSON format.
Content
/trades
/trades
Fetch market trades from recent to oldest.
Request parameters
market
required
a market contract address
limit
optional
max number of trades , default is 100
Response
An array of trade objects.
/orders
/orders
Fetch user orders.
Request parameters
market
required
a market contract address
user
required
a user address
limit
optional
max number of orders , default is 100
Response
An array of order objects.
/orderbook
/orderbook
Fetch the current state of the market order book.
Request parameters
market
required
a market contract address
aggregation
optional
one of market aggregation, if not set max, aggregation is used
limit
optional
max number of levels in asks and bids , default is 100
Response
Object with fields:
timestamp
number represents timestamp
the update time
levels
object with fields"asks" and "bids"
Each field is a sorted array of order book level objects; asks are sorted in ascending order by price, and bids are sorted in descending order.
/fills
/fills
Get executed parts of user orders.
Request parameters
market
required
a market contract address
user
required
a user address
limit
optional
max number of objects in response, default is 100
Response
An array of order fill objects descending by a timestamp field.
/candles
/candles
Get executed parts of user orders.
Request parameters
market
required
a market contract address
fromTime
optional
a lower bound of candle time
toTime
optional
an upper limit of candle time
Response
An array of candle objects ascending by a time field.
/markets
/markets
Request parameters
market
optional
a market contract address
Response
An array of market objects.
/user-balances
/user-balances
Request parameters
user
required
a user address
Response
An object with a key "balances" and a value that is an array of objects:
token
string
a token symbol
tokenAddress
string
a token address
hold
number
amount of tokens locked in orders
total
number
amount of hold tokens plus a deposit in market contract
Last updated