For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Maker API

Maker API endpoints for creating, querying, and cancelling limit orders.

Maker

Maker endpoints handle the full lifecycle of a limit order from the Maker's perspective: creating orders gaslessly, querying their status, and cancelling them either gaslessly or on-chain.

For step-by-step integration guides, see:


Get Unsigned Create Order Message

POST /write/api/v1/orders/sign-message

Returns an unsigned EIP-712 typed data object that the Maker must sign before submitting an order. The domain, types, and message fields are passed directly to signTypedData.

Get Unsigned Create Order Message

post

Get EIP712 create order message to be signed. The response of this API will need to be signed with Sign Typed Data v4 before submitting create order request to KyberSwap via /write/api/v1/orders.

The server computes the fee (makerTokenFeePercent) and the fee recipient (feeRecipient) and packs both into the signed feeConfig. The fee recipient depends on the X-Client-Id header and the referral field.

You must send the same X-Client-Id, referral and nativeOutput values, and the returned message.salt, to /write/api/v1/orders. Otherwise the order hash differs and signature verification fails.

Header parameters
X-Client-Idstring · max: 256Optional

Your client/integrator identifier. It selects the fee recipient that is packed into the signed feeConfig, and it is stored with the order for attribution.

Send the same value to /write/api/v1/orders/sign-message and /write/api/v1/orders, otherwise the signature check fails. Longer than 256 characters returns 400/4004.

Body
chainIdstringRequired

The chainId on which the order is being created. Only supports EVM chains.

makerAssetstringRequired

The token address of the asset which the Maker is selling.

takerAssetstringRequired

The token address of the asset which the Maker expects in return.

makerstringRequired

The address of the Maker.

receiverstringOptional

Defines who will receive the takerAsset when the order is filled. Default: maker.

allowedSendersstring[] · max: 1Optional

Defines the addresses who are allowed to fill the order.

makingAmountstringRequired

The amount of makerAsset in wei. String representation of uint256 value.

takingAmountstringRequired

The amount of takerAsset in wei. String representation of uint256 value.

referralstringOptional

Optional referral identifier. It is part of the fee recipient selection, so the same value must be sent when creating the order.

nativeOutputbooleanOptional

When true, the Maker receives the native token (e.g. ETH) instead of the wrapped native token.

Only allowed when takerAsset is the chain's wrapped native token and the chain supports unwrapping; otherwise the request fails with 400/4001. The server then sets the order's receiver to the unwrapper contract and encodes the real receiver in interaction.

Default: false
expiredAtintegerRequired

The unix timestamp (seconds) upon which the order will automatically lapse (i.e. expire). Must be at least a few seconds in the future.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/write/api/v1/orders/sign-message
POST /write/api/v1/orders/sign-message HTTP/1.1
Host: limit-order.kyberswap.com
Content-Type: application/json
Accept: */*
Content-Length: 331

{
  "chainId": "137",
  "makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
  "takerAsset": "0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c",
  "maker": "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7",
  "allowedSenders": [
    "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7"
  ],
  "makingAmount": "10000",
  "takingAmount": "20000000000000000",
  "expiredAt": 1697690051
}
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "types": {
      "EIP712Domain": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "version",
          "type": "string"
        },
        {
          "name": "chainId",
          "type": "uint256"
        },
        {
          "name": "verifyingContract",
          "type": "address"
        }
      ],
      "Order": [
        {
          "name": "salt",
          "type": "uint256"
        },
        {
          "name": "makerAsset",
          "type": "address"
        },
        {
          "name": "takerAsset",
          "type": "address"
        },
        {
          "name": "maker",
          "type": "address"
        },
        {
          "name": "receiver",
          "type": "address"
        },
        {
          "name": "allowedSender",
          "type": "address"
        },
        {
          "name": "makingAmount",
          "type": "uint256"
        },
        {
          "name": "takingAmount",
          "type": "uint256"
        },
        {
          "name": "feeConfig",
          "type": "uint256"
        },
        {
          "name": "makerAssetData",
          "type": "bytes"
        },
        {
          "name": "takerAssetData",
          "type": "bytes"
        },
        {
          "name": "getMakerAmount",
          "type": "bytes"
        },
        {
          "name": "getTakerAmount",
          "type": "bytes"
        },
        {
          "name": "predicate",
          "type": "bytes"
        },
        {
          "name": "interaction",
          "type": "bytes"
        }
      ]
    },
    "domain": {
      "name": "Kyber DSLO Protocol",
      "version": "1",
      "chainId": 137,
      "verifyingContract": "0xcab2FA2eeab7065B45CBcF6E3936dDE2506b4f6C"
    },
    "primaryType": "Order",
    "message": {
      "allowedSender": "0x2bfc3a4ef52fe6cd2c5236da08005c59eafb43a7",
      "feeConfig": "73529011378642731556159749336395186902652258478889",
      "getMakerAmount": "0xf4a215c3000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000470de4df820000",
      "getTakerAmount": "0x296637bf000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000470de4df820000",
      "interaction": "0x",
      "maker": "0x2bfc3a4ef52fe6cd2c5236da08005c59eafb43a7",
      "makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
      "makerAssetData": "0x",
      "makingAmount": "10000",
      "predicate": "0x961d5b1e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044cf6fc6e30000000000000000000000002bfc3a4ef52fe6cd2c5236da08005c59eafb43a7000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002463592c2b0000000000000000000000000000000000000000000000000000000065308b6d00000000000000000000000000000000000000000000000000000000",
      "receiver": "0x2bfc3a4ef52fe6cd2c5236da08005c59eafb43a7",
      "salt": "108360087403015833110619993432889154326",
      "takerAsset": "0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c",
      "takerAssetData": "0x",
      "takingAmount": "20000000000000000"
    }
  }
}

Create Order

POST /write/api/v1/orders

Submits a signed limit order to the KyberSwap orderbook. The request body is the unsigned order body extended with salt (from the sign-message response) and signature (from the Maker's wallet).

Create New Order

post

API for Makers to create new orders by sending in order params which includes the signed EIP712 message returned in /write/api/v1/orders/sign-message.

Send the same X-Client-Id header, referral and nativeOutput values, and the salt returned by /write/api/v1/orders/sign-message. These determine the order hash and the server-computed fee recipient, so any difference makes the signature invalid.

The fee (makerTokenFeePercent) and fee recipient are computed by the server and cannot be set by the client.

Header parameters
X-Client-Idstring · max: 256Optional

Your client/integrator identifier. It selects the fee recipient that is packed into the signed feeConfig, and it is stored with the order for attribution.

Send the same value to /write/api/v1/orders/sign-message and /write/api/v1/orders, otherwise the signature check fails. Longer than 256 characters returns 400/4004.

Body
chainIdstringRequired

The chainId on which the order is being created. Only supports EVM chains.

makerAssetstringRequired

The token address of the asset which the Maker is selling.

takerAssetstringRequired

The token address of the asset which the Maker expects in return.

makerstringRequired

The address of the Maker.

receiverstringOptional

Defines who will receive the takerAsset when the order is filled. Default: maker.

allowedSendersstring[] · max: 1Optional

Defines the addresses who are allowed to fill the order.

makingAmountstringRequired

The amount of makerAsset in wei. String representation of uint256 value.

takingAmountstringRequired

The amount of takerAsset in wei. String representation of uint256 value.

referralstringOptional

Optional referral identifier. It is part of the fee recipient selection, so the same value must be sent when creating the order.

nativeOutputbooleanOptional

When true, the Maker receives the native token (e.g. ETH) instead of the wrapped native token.

Only allowed when takerAsset is the chain's wrapped native token and the chain supports unwrapping; otherwise the request fails with 400/4001. The server then sets the order's receiver to the unwrapper contract and encodes the real receiver in interaction.

Default: false
expiredAtintegerRequired

The unix timestamp (seconds) upon which the order will automatically lapse (i.e. expire). Must be at least a few seconds in the future.

saltstringRequired

The randomized data fed as an additional input to the hashing function. Returned in /write/api/v1/orders/sign-message.

signaturestringRequired

The Maker's signature (signTypedData v4) over the EIP712 message returned by /write/api/v1/orders/sign-message, as a hex string. EOA (ECDSA), ERC-1271 and ERC-6492 smart-wallet signatures are accepted.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/write/api/v1/orders
POST /write/api/v1/orders HTTP/1.1
Host: limit-order.kyberswap.com
Content-Type: application/json
Accept: */*
Content-Length: 527

{
  "chainId": "137",
  "makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
  "takerAsset": "0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c",
  "maker": "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7",
  "allowedSenders": [
    "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7"
  ],
  "makingAmount": "10000",
  "takingAmount": "20000000000000000",
  "expiredAt": 1697683411,
  "salt": "235124343165545613944116882191476069603",
  "signature": "0xff25fe292d922e7a28b4b84919d2709b8b01a4d2cd4d5ee2335b227dbaa13e1f789d861e1cbb1153e251d839651490276bae2324266f3107c1ade2137c6b4c301b"
}
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "id": 1
  }
}

Get Maker Orders

GET /read-ks/api/v1/orders

Returns all orders for a Maker address, filterable by status (active, open, cancelled, filled, expired).

Get List Of Orders By Maker

get

Get all orders created by a Maker address filtered by the order status, sorted by creation time (newest first by default).

Paging closed orders. For closed, filled, cancelled and expired, page/pageSize paging only reaches a limited depth of the Maker's history (the first 1000 orders at the time of writing). Deeper pages return 400/4002 (page), and totalItems is capped just above that depth.

To walk the history, prefer cursor paging: request the first page without cursor, then pass the returned pagination.nextCursor as cursor while pagination.hasMore is true.

Query parameters
chainIdstringOptional

Optional. The chainId to filter on. When both chainId and chainIds are omitted, orders across all chains are returned.

chainIdsstring[] · max: 100Optional

Optional multi-chain filter, sent as repeated keys (e.g. chainIds=1&chainIds=137), at most 100 entries. When non-empty it takes precedence over chainId.

makerstringRequired

The address of the Maker.

statusstring · enumRequired

The status of the order to filter for:

  • active: Order is active (both open and has been partially filled). Also includes cancelling orders.
  • open: Order is open and has yet to be filled.
  • partially_filled: Order has been partially filled.
  • cancelling: A gasless cancellation was requested and is waiting for the outstanding operator signature to expire (see /write/api/v1/orders/cancel).
  • closed: Order has been closed and can no longer be filled (filled, cancelled or expired).
  • filled: Order has been filled with no remaining assets to be filled.
  • cancelled: Order was cancelled by the Maker and can no longer be filled.
  • expired: Order can no longer be filled as the expiry set by the Maker is in the past.
Possible values:
querystringOptional

Token symbol or token address, matched against either side of the order. A symbol matches by prefix; an address matches exactly. A pair such as WETH/USDT, WETH-USDT or WETH USDT matches either direction.

pageinteger · min: 1Optional

Page number to return. Minimum and default is set at 1. Ignored when cursor is set; combining cursor with page > 1 returns 400/4001.

Default: 1
pageSizeinteger · min: 1 · max: 100Optional

Number of results to display per page. Minimum is 1 and maximum is 100. Default is 10.

Default: 10
sortstringOptional

Sort order as createdAt:asc or createdAt:desc (default). createdAt is the only supported field. Cursor paging supports only the default order.

Default: createdAt:desc
cursorstringOptional

Opaque keyset-paging token taken from pagination.nextCursor of the previous response. Only valid for closed statuses (closed, filled, cancelled, expired); sending it with an active status returns 400/4001. Send it with the same filters as the request that produced it.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get/read-ks/api/v1/orders
GET /read-ks/api/v1/orders?maker=text&status=active HTTP/1.1
Host: limit-order.kyberswap.com
Accept: */*
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "orders": [
      {
        "id": 22385,
        "chainId": "137",
        "nonce": 3,
        "makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
        "takerAsset": "0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c",
        "contractAddress": "0xcab2fa2eeab7065b45cbcf6e3936dde2506b4f6c",
        "orderHash": "57e2bec735db51269aff31b60f4a02f8bd2ef2e554c1433bbd0aea914c378f3a",
        "makerAssetSymbol": "USDC.e",
        "takerAssetSymbol": "KNC",
        "makerAssetLogoURL": "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png",
        "takerAssetLogoURL": "https://storage.googleapis.com/ks-setting-1d682dca/9e796f57-482a-426d-904d-007a6adf22fb.png",
        "makerAssetDecimals": 6,
        "takerAssetDecimals": 18,
        "makingAmount": "10000",
        "takingAmount": "20000000000000000",
        "filledMakingAmount": "0",
        "filledTakingAmount": "0",
        "status": "open",
        "createdAt": 1697679812,
        "expiredAt": 1697683411,
        "operatorSignatureExpiredAt": 0,
        "clientId": "my-dapp",
        "isTakerAssetFee": false,
        "transactions": []
      }
    ],
    "pagination": {
      "totalItems": 1,
      "hasMore": false
    }
  }
}

Get Active Making Amount

GET /read-ks/api/v1/orders/active-making-amount

Returns the total makingAmount currently committed across all open orders for a Maker and token. Use this before creating a new order to determine the total allowance required.

Get Maker Active Making Amount

get

Get the Maker's total remaining making amount for a specified token: the sum of makingAmount - filledMakingAmount over the Maker's open and partially_filled orders selling makerAsset. Optionally scope it to one takerAsset.

Also served as /read-partner/api/v1/orders/active-making-amount.

Query parameters
chainIdstringRequired

The chainId on which the order is being created. Only supports EVM chains.

makerAssetstringRequired

The token address of the asset which the Maker is selling.

makerstringRequired

The address of the Maker.

takerAssetstringOptional

Optional. When set, only orders for the makerAsset -> takerAsset pair are counted.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get/read-ks/api/v1/orders/active-making-amount
GET /read-ks/api/v1/orders/active-making-amount?chainId=text&makerAsset=text&maker=text HTTP/1.1
Host: limit-order.kyberswap.com
Accept: */*
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "activeMakingAmount": "1000000000000000000"
  }
}

Get Unsigned Cancel Message

POST /write/api/v1/orders/cancel-sign

Returns an unsigned EIP-712 cancel message for one or more orderIds. Sign the returned message and pass it to POST /write/api/v1/orders/cancel.

Get Unsigned Cancel Order(s) Message

post

Get EIP712 cancel order message to be signed (i.e. 'Gasless Cancel'). The response of this API will need to be signed with Sign Typed Data v4 before submitting the cancel request to KyberSwap via /write/api/v1/orders/cancel.

This endpoint only builds the message. It does not check that the orders exist or belong to the Maker; that is checked by /write/api/v1/orders/cancel.

Body
chainIdstringRequired

The chainId on which the order is being created. Only supports EVM chains.

makerstringRequired

The address of the Maker that created the order.

orderIdsinteger[]Required

The order IDs to be cancelled gaslessly.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/write/api/v1/orders/cancel-sign
POST /write/api/v1/orders/cancel-sign HTTP/1.1
Host: limit-order.kyberswap.com
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "chainId": "137",
  "maker": "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7",
  "orderIds": [
    22393
  ]
}
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "types": {
      "EIP712Domain": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "version",
          "type": "string"
        },
        {
          "name": "chainId",
          "type": "uint256"
        }
      ],
      "CancelOrder": [
        {
          "name": "chainId",
          "type": "string"
        },
        {
          "name": "maker",
          "type": "address"
        },
        {
          "name": "orderIds",
          "type": "uint64[]"
        }
      ]
    },
    "domain": {
      "name": "Kyber Limit Order Protocol",
      "version": "1",
      "chainId": "137"
    },
    "primaryType": "CancelOrder",
    "message": {
      "chainId": "137",
      "maker": "0x2bfc3a4ef52fe6cd2c5236da08005c59eafb43a7",
      "orderIds": [
        22393
      ]
    }
  }
}

Gasless Cancel Order

POST /write/api/v1/orders/cancel

Submits a signed gasless cancel request. The KyberSwap Operator will stop co-signing the specified orders. If the Operator recently signed an order, cancellation may take up to 5 minutes.

Requires the Origin header to be set.

Submit Gasless Cancel Order(s)

post

API for Makers to gaslessly cancel orders by sending in order params which includes the signed EIP712 message returned in /write/api/v1/orders/cancel-sign.

All orderIds must be active orders of maker on chainId.

  • If an order has no operator signature that is still valid (operatorSignatureExpiredAt in the past, or 0), it is cancelled immediately.

  • Otherwise its status becomes cancelling until operatorSignatureExpiredAt, because a Taker may still fill it with the operator signature already issued. After that time the cancellation completes automatically.

Gasless cancellation never stops a fill that is already in flight. For an immediate, guaranteed cancellation, cancel on-chain (see /read-ks/api/v1/encode/cancel-batch-orders).

Body
chainIdstringRequired

The chainId on which the order is being cancelled. Only supports EVM chains.

makerstringRequired

The address of the Maker that created the order.

orderIdsinteger[]Required

The order IDs to be cancelled gaslessly.

signaturestringRequired

The Maker's signature (signTypedData v4) over the EIP712 message returned by /write/api/v1/orders/cancel-sign, as a hex string. EOA, ERC-1271 and ERC-6492 signatures are accepted.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/write/api/v1/orders/cancel
POST /write/api/v1/orders/cancel HTTP/1.1
Host: limit-order.kyberswap.com
Content-Type: application/json
Accept: */*
Content-Length: 236

{
  "chainId": "137",
  "maker": "0x2bfc3A4Ef52Fe6cD2c5236dA08005C59EaFB43a7",
  "orderIds": [
    22405
  ],
  "signature": "0xc888d70ebd240e95dc2af556c8002bb8ad92c3e34f6c037e496779d06e778ede53b76399fdacdb812fc0bc3eb7a429ae0b1bdfeabf052f212f732daea628beaa1c"
}
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "orders": [
      {
        "id": 22404,
        "chainId": "137",
        "operatorSignatureExpiredAt": 0
      }
    ]
  }
}

Encode Hard Cancel

POST /read-ks/api/v1/encode/cancel-batch-orders

Returns encoded calldata to cancel one or more specific orders on-chain. Multiple orderIds can be batched into a single transaction. The caller pays gas but the cancellation is immediate.

Generate Encoded Data For Batch Cancellation

post

Request for the cancellation encoded data from KyberSwap. This data can then be executed on-chain from the Maker's wallet.

Send the transaction to the orders' contractAddress (returned by the order query APIs) on the orders' chain. The response does not include the target address.

All orders must be active (open, partially_filled or cancelling) and share the same Maker, chain and contract.

Also served as /read-partner/api/v1/encode/cancel-batch-orders.

Body
orderIdsinteger[] · min: 1Required

The order IDs to be cancelled on-chain. Must be unique.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/read-ks/api/v1/encode/cancel-batch-orders
POST /read-ks/api/v1/encode/cancel-batch-orders HTTP/1.1
Host: limit-order.kyberswap.com
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "orderIds": [
    22393,
    22394
  ]
}
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "encodedData": "0xf7da270200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000bf887decc94b42c183580ae17ef2f93d0000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa841740000000000000000000000001c954e8fe737f99f68fa1ccda3e51ebdb291948c0000000000000000000000002bfc3a4ef52fe6cd2c5236da08005c59eafb43a70000000000000000000000002bfc3a4ef52fe6cd2c5236da08005c59eafb43a70000000000000000000000002bfc3a4ef52fe6cd2c5236da08005c59eafb43a7000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000470de4df8200000000000000000000000000324f82e73edb06d29ff62c91ec8f5ff06571bdeb2900000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044f4a215c3000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000470de4df820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044296637bf000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000470de4df8200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e4961d5b1e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044cf6fc6e30000000000000000000000002bfc3a4ef52fe6cd2c5236da08005c59eafb43a7000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002463592c2b000000000000000000000000000000000000000000000000000000006530ac2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  }
}

Encode Increase Nonce

POST /read-ks/api/v1/encode/increase-nonce

Returns encoded calldata to increment the Maker's nonce in the Limit Order contract, which immediately invalidates all open orders. Use when you want to cancel everything at once.

Generate Encoded Data For Cancel All

post

Request for the cancel all encoded data from KyberSwap. Increasing the Maker's nonce on a limit order contract invalidates all of the Maker's existing orders on that contract. This data can then be executed on-chain from the Maker's wallet.

No request body or chainId is needed; the calldata is the same on every chain. Send the transaction from the Maker's wallet to the limit order contract whose orders should be invalidated: the contractAddress of the orders, or latest from /read-ks/api/v1/configs/contract-address.

Also served as /read-partner/api/v1/encode/increase-nonce.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post/read-ks/api/v1/encode/increase-nonce
POST /read-ks/api/v1/encode/increase-nonce HTTP/1.1
Host: limit-order.kyberswap.com
Accept: */*
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "encodedData": "0xc53a0292"
  }
}

Last updated

Was this helpful?