Endpoints
Orders
Limit and DCA orders: list them, and get the calldata to create or cancel one.
https://api.lane.markets/v1local instance: http://localhost:3000/v1Open limit/DCA orders
/v1/ordersQuery parameters
owneraddress
Responses
200Orders
ordersobject[]orders[].iduint stringorders[].owneraddressorders[].tokenInstringorders[].tokenOutstringorders[].remaininguint stringorders[].perSliceuint stringorders[].minOutPerSliceuint stringorders[].intervaluint stringorders[].nextFillAtuint stringorders[].expiryuint stringorders[].statusobject | nullKeeper's last check
orders[].status.state"scheduled" | "waiting_price" | "no_route" | "filling"orders[].status.bestOutstring | nullorders[].status.minOutuint stringorders[].status.checkedAtinteger
503OrderBook not configured
curl "https://api.lane.markets/v1/orders"Calldata to place a limit order (slices=1) or a DCA (slices>1)
/v1/orders/createQuery parameters
intoken idrequiredERC20 address, or HYPE for native
outtoken idrequiredERC20 address, or HYPE for native
amountuint stringrequiredTotal input, base units
owneraddressrequiredminOutuint stringrequiredMinimum output for the WHOLE amount (> 0), enforced pro rata per slice
slicesintegerdefault 1intervalintegerdefault 0Seconds between slices (required if slices > 1)
expiresInintegerdefault 604800Seconds until expiry
Responses
200Simulated create transaction
orderobjectorder.perSliceuint stringorder.minOutPerSliceuint stringorder.slicesuint stringorder.intervaluint stringorder.expiryuint stringtxobjecttx.fromaddresstx.toaddresstx.datastringtx.valueuint stringtx.chainIdintegertx.warningstringPresent when the simulation failed. Do not send.
approvalobject | nullERC20 approve to send before
tx(null if the allowance is enough)approval.toaddressapproval.datastringsimulationobjectsimulation.okbooleansimulation.gasuint stringsimulation.errorstring
400Invalid input
curl "https://api.lane.markets/v1/orders/create?in=HYPE&out=0x7D29d8047B905000459c0E80c34a26CeedcB47b2&amount=1000000000000000000&owner=0xYourAddress&minOut=26000000"Calldata to cancel an order
/v1/orders/cancelThe owner can cancel any time; anyone can cancel after expiry. The refund always goes to the owner.
Query parameters
iduint stringrequiredUnsigned integer as a decimal string
Responses
200Cancel transaction
txobjecttx.fromaddresstx.toaddresstx.datastringtx.valueuint stringtx.chainIdintegertx.warningstringPresent when the simulation failed. Do not send.
curl "https://api.lane.markets/v1/orders/cancel?id=1"