Post endpoints

Place order

POST /place_order

User must submit its order and signature of the order hash. The endpoint will process this and returns an associated hash.

  • Note: the "signature" is a result of signing the hash of the order message by the user's private key. The order message is a SNIP12-revision 0 typed offchain message

To receive updates on the order, users need to subscribe over WebSockets. In the case of an unsuccessful request, the error codes are returned (see here)

Cancel single order offchain

POST /cancel_order

Body json parameters:

  • maker: trading account.

  • order_hash: hash of the order to be cancelled

  • salt: a random value used for ensuring the uniqueness of the cancel request

  • sign: signature data that is required to authorise the cancellation

    • To sign a cancel request, you must first obtain the Pedersen hash of the typed message for the request and then sign it by your signer private key

Cancel all offchain

POST /cancel_all_orders

Cancels all orders under a specified ticker hash

Withdraw offchain

POST /withdraw

Withdraws specified amount of tokens

Cancel all onchain

POST /increase_nonce

Cancels all orders onchain invalidating all orders with nonce less than the new one

For detailed description of endpoints please refer to the Swagger UI below

Last updated