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

General API

General endpoints for querying supported pairs and contract addresses.

General

Get Supported Pairs

GET /read-partner/api/v1/orders/pairs

Returns all token pairs for which active limit orders exist on the specified chain.

Get Chain Supported Pairs

get

Returns the token pairs that currently have at least one active (open or partially filled) order on the chain. Please refer to Supported Exchanges And Networks for full list of supported networks.

Snapshot vs delta.

  • Without lastUpdatedAt (or with lastUpdatedAt=0) the response is a full snapshot of all active pairs. Snapshots are served from a shared cache and may lag real time by a few seconds.

  • With lastUpdatedAt > 0 the response is a delta since that cutoff, read directly from the database:

    • pairs: pairs that have an active order created or modified after the cutoff, plus pairs that had an order deactivated after the cutoff but still have another active order.

    • deletedPairs: pairs that had an order deactivated (filled, cancelled or expired) after the cutoff and have no active order left. Remove these from your local copy.

Deltas are not paginated; both lists are complete for the requested window.

Recommended polling pattern: fetch one snapshot, then poll deltas. For each delta, set lastUpdatedAt to the start time of your previous request (unix seconds) minus a few seconds of overlap. The cutoff is exclusive and has one-second granularity.

Maximum delta age: a lastUpdatedAt older than about 7 days is rejected with HTTP 400, code 4001, errorEntities: ["lastUpdatedAt"]. Do not retry the same cutoff: fetch a full snapshot (omit lastUpdatedAt) and resume deltas from it.

Query parameters
chainIdstringRequired

The chainId of the network to query.

lastUpdatedAtinteger · int64Optional

Optional delta cutoff as a unix timestamp in seconds (not milliseconds). Only changes with an update time strictly greater than this value are returned, as pairs and deletedPairs. Omit it, or pass 0, for a full snapshot.

Warning: a millisecond value is not rejected. It lies in the future, so the response is silently empty.

Negative values return 400/4002; non-integer values return 400/4003; values older than about 7 days return 400/4001.

hasDistinctContractAddressbooleanOptional

When true, pairs are distinguished per limit order contract, i.e. keyed by (makerAsset, takerAsset, contractAddress), and each item includes contractAddress. When false (default), a pair is listed once regardless of contract.

Default: false
Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get/read-partner/api/v1/orders/pairs
GET /read-partner/api/v1/orders/pairs?chainId=text HTTP/1.1
Host: limit-order.kyberswap.com
Accept: */*
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "pairs": [
      {
        "makerAsset": "0x1c954e8fe737f99f68fa1ccda3e51ebdb291948c",
        "takerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"
      }
    ],
    "deletedPairs": [
      {
        "makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
        "takerAsset": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"
      }
    ]
  }
}

Get Contract Address

GET /read-ks/api/v1/configs/contract-address

Returns the deployed Limit Order contract addresses for a given chain ID.

Get Limit Order Contract Addresses

get

Please refer to Supported Exchanges And Networks for full list of supported networks.

Query parameters
chainIdstringRequired

The chainId of the network to query.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get/read-ks/api/v1/configs/contract-address
GET /read-ks/api/v1/configs/contract-address?chainId=text HTTP/1.1
Host: limit-order.kyberswap.com
Accept: */*
{
  "code": 0,
  "message": "Succeeded",
  "data": {
    "latest": "0xcab2FA2eeab7065B45CBcF6E3936dDE2506b4f6C",
    "features": {
      "0xBff3AF706AedfAa19724BAb00947b7cD7bF3Af5F": {
        "supportDoubleSignature": false
      },
      "0xcab2FA2eeab7065B45CBcF6E3936dDE2506b4f6C": {
        "supportDoubleSignature": true
      }
    }
  }
}

The full return object is defined in the OpenAPI YAML. GitBook has limited support for additionalProperties, so refer to the YAML directly for the complete schema.

For a static list of deployed addresses, see Contracts & Addresses.

Last updated

Was this helpful?