Trading

Create order (compact schema supported)

post
/orders
Authorizations
AuthorizationstringRequired

Compact signature envelope. Only keccak256 + secp256k1 are supported.

Authorization: Bondis alg=<secp256k1-keccak-eip712|secp256k1-keccak-raw>, h=<0x..>, sig=<0x..>

  • Default alg is secp256k1-keccak-eip712.
  • h is keccak256(CRR) of the Canonical Request Representation.
  • sig signs h.
Body

Compact body; verbose keys are also accepted but canonicalized before hashing.

vstring · enumRequiredExample: 1cPossible values:
opstring · enumRequired

order op: new

Example: nPossible values:
mstringRequired

Market

Example: USD/BRL
sstring · enumRequired

side: b=buy, s=sell

Example: bPossible values:
rstring · enumRequiredExample: makerPossible values:
tstring · enumRequiredExample: limitPossible values:
pstringOptional

Price (decimal string)

Example: 5.1234
qstringRequired

Size (decimal string)

Example: 10000
cidstringOptional

Client idempotency id

Example: abc-123
Responses
200

Order ack

application/json
post
/orders
POST /v1/orders HTTP/1.1
Host: api.bondis.xyz
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106

{
  "v": "1c",
  "op": "n",
  "m": "USD/BRL",
  "s": "b",
  "r": "maker",
  "t": "limit",
  "p": "5.1234",
  "q": "10000",
  "cid": "abc-123"
}
{
  "order_id": "ord_7YQ9",
  "status": "accepted",
  "block_id": 120394
}

Cancel order (path)

delete
/orders/{orderId}
Authorizations
AuthorizationstringRequired

Compact signature envelope. Only keccak256 + secp256k1 are supported.

Authorization: Bondis alg=<secp256k1-keccak-eip712|secp256k1-keccak-raw>, h=<0x..>, sig=<0x..>

  • Default alg is secp256k1-keccak-eip712.
  • h is keccak256(CRR) of the Canonical Request Representation.
  • sig signs h.
Path parameters
orderIdstringRequired
Responses
200

Cancellation accepted

application/json
delete
/orders/{orderId}
DELETE /v1/orders/{orderId} HTTP/1.1
Host: api.bondis.xyz
Authorization: YOUR_API_KEY
Accept: */*
{
  "order_id": "ord_7YQ9",
  "status": "accepted",
  "block_id": 120394
}

Create multiple orders in a single batch

post
/orders/batch
Authorizations
AuthorizationstringRequired

Compact signature envelope. Only keccak256 + secp256k1 are supported.

Authorization: Bondis alg=<secp256k1-keccak-eip712|secp256k1-keccak-raw>, h=<0x..>, sig=<0x..>

  • Default alg is secp256k1-keccak-eip712.
  • h is keccak256(CRR) of the Canonical Request Representation.
  • sig signs h.
Body

Batch order creation request. All orders must be valid for the batch to be accepted.

Responses
200

Batch order response

application/json
post
/orders/batch
POST /v1/orders/batch HTTP/1.1
Host: api.bondis.xyz
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225

{
  "orders": [
    {
      "v": "1c",
      "op": "n",
      "m": "USD/BRL",
      "s": "b",
      "r": "maker",
      "t": "limit",
      "p": "5.1234",
      "q": "10000",
      "cid": "abc-123"
    },
    {
      "v": "1c",
      "op": "n",
      "m": "USD/BRL",
      "s": "s",
      "r": "maker",
      "t": "limit",
      "p": "5.1240",
      "q": "5000",
      "cid": "def-456"
    }
  ]
}
{
  "orders": [
    {
      "order_id": "ord_7YQ9",
      "status": "accepted",
      "block_id": 120394
    },
    {
      "order_id": "ord_8ZR1",
      "status": "accepted",
      "block_id": 120394
    }
  ],
  "block_id": 120394
}

Cancel by market/side (compact)

post
/orders/cancel
Authorizations
AuthorizationstringRequired

Compact signature envelope. Only keccak256 + secp256k1 are supported.

Authorization: Bondis alg=<secp256k1-keccak-eip712|secp256k1-keccak-raw>, h=<0x..>, sig=<0x..>

  • Default alg is secp256k1-keccak-eip712.
  • h is keccak256(CRR) of the Canonical Request Representation.
  • sig signs h.
Body
vstring · enumRequiredExample: 1cPossible values:
opstring · enumRequiredExample: cPossible values:
mstringRequiredExample: USD/BRL
sstring · enumRequiredExample: bothPossible values:
Responses
200

Accepted

application/json
post
/orders/cancel
POST /v1/orders/cancel HTTP/1.1
Host: api.bondis.xyz
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "v": "1c",
  "op": "c",
  "m": "USD/BRL",
  "s": "both"
}
200

Accepted

{
  "canceled": 3,
  "block_id": 120394
}

Cancel multiple orders by order IDs

delete
/orders/batch/cancel
Authorizations
AuthorizationstringRequired

Compact signature envelope. Only keccak256 + secp256k1 are supported.

Authorization: Bondis alg=<secp256k1-keccak-eip712|secp256k1-keccak-raw>, h=<0x..>, sig=<0x..>

  • Default alg is secp256k1-keccak-eip712.
  • h is keccak256(CRR) of the Canonical Request Representation.
  • sig signs h.
Body

Batch cancel request by order IDs. All specified orders will be cancelled if they exist and are cancellable.

order_idsstring[] · min: 1 · max: 100RequiredExample: ["ord_7YQ9","ord_8ZR1","ord_9AS2"]
Responses
200

Batch cancel response

application/json
delete
/orders/batch/cancel
DELETE /v1/orders/batch/cancel HTTP/1.1
Host: api.bondis.xyz
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "order_ids": [
    "ord_7YQ9",
    "ord_8ZR1",
    "ord_9AS2"
  ]
}
{
  "cancelled": [
    {
      "order_id": "ord_7YQ9",
      "status": "cancelled"
    },
    {
      "order_id": "ord_8ZR1",
      "status": "cancelled"
    },
    {
      "order_id": "ord_9AS2",
      "status": "not_found"
    }
  ],
  "block_id": 120394
}