Tutorial: Order book
What is an Order book?
Condition
Walkthrough
Fetch Order book [JavaScript]
order = {
'asset': {
'id': 15322902,
'decimals': 6,
},
'address': 'WYWRYK42XADLY3O62N52BOLT27DMPRA3WNBT2OBRT65N6OEZQWD4OSH6PI',
'price': 3.22,
'amount': 1,
'execution': 'taker',
'type': 'buy',
}
const res = await api.http.dexd.fetchAssetOrders(order.asset.id)
const orderbook = api.http.dexd.mapToAllEscrowOrders({
buy: res.buyASAOrdersInEscrow,
sell: res.sellASAOrdersInEscrow,
})
await api.placeOrder(order, {orderbook})Last updated