HTTP API
All endpoints use HTTP GET requests with several URL parameters. All responses are encoded in JSON format.
Last updated
All endpoints use HTTP GET requests with several URL parameters. All responses are encoded in JSON format.
Last updated
/trades
Fetch market trades from recent to oldest.
market
required
a market contract address
limit
optional
max number of trades , default is 100
/orders
Fetch user orders.
market
required
a market contract address
user
required
a user address
limit
optional
max number of orders , default is 100
/orderbook
Fetch the current state of the market order book.
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
Object with fields:
timestamp
number represents timestamp
the update time
levels
object with fields"asks" and "bids"
/fills
Get executed parts of user orders.
market
required
a market contract address
user
required
a user address
limit
optional
max number of objects in response, default is 100
An array of order fill objects descending by a timestamp field.
/candles
Get executed parts of user orders.
market
required
a market contract address
resolution
required
fromTime
optional
a lower bound of candle time
toTime
optional
an upper limit of candle time
/markets
market
optional
a market contract address
/user-balances
user
required
a user address
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
An array of objects.
An array of objects.
Each field is a sorted array of order book objects; asks are sorted in ascending order by price, and bids are sorted in descending order.
one of object resolution
An array of objects ascending by a time field.
An array of objects.