Taker API

Taker

Taker endpoints cover the full fill flow: query open orders sorted by best rate, obtain the required Operator co-signature, encode the fill calldata, and execute on-chain.

For a step-by-step guide, see Fill a Limit Order.

For taker protocol fees and the rate calculation formula, see Fee Structure.


Get Open Orders

GET /read-partner/api/v1/orders

Returns open orders for a token pair sorted by best effective rate (descending). The rate accounts for partial fills and protocol fees — see Fee Structure.

Get Orders By Token Pair

get

Returns orders for the queried token pair sorted by best rates in descending order.

Query parameters
chainIdstringRequired

The chainId of the network to query.

makerAssetstringRequired

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

takerAssetstringRequired

The token address of the asset which the Taker is exchanging.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get
/read-partner/api/v1/orders

Get Operator Signature

GET /read-partner/api/v1/orders/operator-signature

Returns the KyberSwap Operator co-signature for one or more orders. This signature is required as part of the fill calldata and is short-lived — fetch it immediately before building the fill transaction.

Request Operator Signature For Maker Orders

get

Takers will need to request for KyberSwap Operator signature for target Maker orders which they are planning to fill. The returned operator signature will be required when encoding the Taker fill order for both /read-ks/api/v1/encode/fill-batch-orders-to and /read-ks/api/v1/encode/fill-order-to.

Query parameters
chainIdstringRequired

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

orderIdsstringRequired

The order IDs to be cancelled gaslessly.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

get
/read-partner/api/v1/orders/operator-signature

Encode Fill Order

POST /read-ks/api/v1/encode/fill-order-to

Returns encoded calldata to fill a single order on-chain. The encoded data is sent as data in the transaction to the Limit Order contract.

Field
Description

orderId

The order to fill

takingAmount

Amount of takerAsset to provide (can be partial)

thresholdAmount

Minimum makingAmount to receive — reverts if not met (slippage guard)

target

Address to receive the makerAsset

operatorSignature

From GET /read-partner/api/v1/orders/operator-signature

Generate Encoded Data To Fill Order

post

Request for the encoded fill order data from KyberSwap. This data can then be executed on-chain from the signer's wallet.

Body
orderIdintegerRequired

The ID of the order to be filled.

takingAmountstringRequired

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

thresholdAmountstringRequired

If thresholdAmount != 0, the order will be filled if and only if (actualTakingAmount / actualMakingAmount) <= (thresholdAmount / requestedMakingAmount).

targetstringRequired

The Taker wallet address which will receive the makerAsset.

operatorSignaturestringRequired

The Operator signature obtained from /read-partner/api/v1/orders/operator-signature. The order must be signed by the operator before it can be filled.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post
/read-ks/api/v1/encode/fill-order-to

Encode Fill Batch Orders

POST /read-ks/api/v1/encode/fill-batch-orders-to

Returns encoded calldata to fill multiple orders in a single on-chain transaction. The orderIds array and operatorSignatures array must be in the same order.

Generate Encoded Data To Fill Batch Order

post

Request for the encoded fill batch order data from KyberSwap. This data can then be executed on-chain from the signer's wallet.

Body
orderIdsinteger[]Required

The order IDs to be filled in the batch order.

takingAmountstringRequired

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

thresholdAmountstringRequired

If thresholdAmount != 0, the order will be filled if and only if (actualTakingAmount / actualMakingAmount) <= (thresholdAmount / requestedMakingAmount).

targetstringRequired

The Taker wallet address which will receive the makerAsset.

operatorSignaturesstring[]Required

The Operator signature obtained from /read-partner/api/v1/orders/operator-signature. The order must be signed by the operator before it can be filled. Operator signature order must match orderIds.

Responses
200

OK

application/json
codeintegerRequired

The response code.

messagestringRequired

Server response message.

post
/read-ks/api/v1/encode/fill-batch-orders-to

Last updated

Was this helpful?