Kyberswap ( Limit Order Endpoints )

Supported Chains

Available on Ethereum, Binance, Polygon, Arbitrum, Avalanche, Optimism, Base, Fantom and Cronos

Available Endpoints:

Click on the endpoint to jump to the section with full details

  • /getmakerorders GET- Returns all active limit orders posted by the maker.

  • /getorders GET - Returns all active orders based on the maker and taker assets.

  • /getactiveamount GET - Returns the maker's active amount for a particular maker asset.

  • /createorder POST - Prepares an unsigned limit order message that will post a limit order once signed with the Expand SDK.

  • /cancelorder POST - Prepares an unsigned message that will cancel a limit order once signed with the Expand SDK.

  • /publishorder POST - Sends a request to create or cancel a limit order to Kyberswap.

  • /fillorder POST - Initiates a transaction to fill a particular limit order.

Also see Error Handling Details

DEX IDs

Below is a list DEX IDs related to Kyberswap (Limit Order). Please see the DEX ID page for a complete DEX ID list and more information.

DEX NameChainDEX ID

Kyberswap

Ethereum

2200

Kyberswap

Binance

2201

Kyberswap

Polygon

2202

Kyberswap

Arbitrum

2203

Kyberswap

Avalanche

2204

Kyberswap

Optimism

2205

Kyberswap

Base

2206

Kyberswap

Fantom

2207

Kyberswap

Cronos

2208

Endpoint Details

/getmakerorders

This endpoint fetches all the active limit orders posted by the maker.

GET https://api.expand.network/dex/getmakerorders

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

address*

String

Public address of the user.

pageToken

String

The page number that the user wants to fetch.

By default, 1.

https://api.expand.network/dex/getmakerorders?dexId=2202&address=0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402&pageToken=1

back to top

/getorders

This endpoint provides all active orders based on the maker and taker assets.

GET https://api.expand.network/dex/getorders

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to DEX ID page for details.

makerAsset*

String

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

takerAsset*

String

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

https://api.expand.network/dex/getorders?dexId=2202&makerAsset=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&takerAsset=0xc2132d05d31c914a87c6611c10748aeb04b58e8f

back to top

/getactiveamount

This endpoint retrieves the maker's active amount for a particular maker asset.

GET https://api.expand.network/dex/getactiveamount

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to DEX ID page for details.

address*

String

Public address of the user.

tokenAddress*

String

Address of the token.

https://api.expand.network/dex/getactiveamount?dexId=2200&tokenAddress=0x853d955acef822db058eb8505911ed77f175b99e&address=0xB409cB0b5DB9f148d0bc491E140D9E0FDd789C11

back to top

/createorder

This endpoint returns a limit order unsigned message that needs to be signed with the expand SDK to post a limit order.

POST https://api.expand.network/dex/createorder

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to DEX ID page for details.

makerAsset*

String

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

takerAsset*

String

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

from*

String

Address of the sender of the token.

to*

String

Address of the recipient of the token.

amountIn*

String

Amount in of token.

amountOut*

String

Amount out of token.

deadline*

String

Deadline for the transaction to be executed (UNIX Timestamp).

{
    "dexId": "2202",
    "makerAsset": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
    "takerAsset": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountIn": "1000000000000000000",
    "amountOut": "500000",
    "deadline": "1821077034"
}

back to top

/cancelorder

This endpoint returns an unsigned message for canceling a limit order, which needs to be signed with expand SDK.

POST https://api.expand.network/dex/cancelorder

Request Body

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

orderId*

Array

OrderId of the transaction

from*

String

Public address of the user.

{
    "dexId": "2202",
    "orderId": "95167",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
}

back to top

/publishorder

This endpoint sends the request to create or cancel a limit order to Kyberswap.

POST https://api.expand.network/dex/publishorder

Request Body For Create Order

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

orderType

String

Type of the Order. Either "create" or "cancel". By default, "create".

makerAsset*

String

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

takerAsset*

String

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

from*

String

Address of the sender of the token.

to*

String

Address of the recipient of the token.

amountIn*

String

Amount in of token.

amountOut*

String

Amount out of token.

deadline*

String

Deadline for the transaction to be executed (UNIX Timestamp).

signature*

String

The signed(signDataTyped) EIP712 creation order.

salt*

String

The randomized data fed as an additional input to the hashing function.

{
    "dexId": "2202",
    "makerAsset": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "takerAsset": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountIn": "200000",
    "amountOut": "100000",
    "deadline": "1821077034",
    "signature": "0x6afd61462c4188b277123d575c4c09c00cbdc654462d3c6937e7ff69d90391e573fe44a81f5fcc0184cc4f5afc54c9d60a46be11176688f034bba92e20597c311c",
    "salt": "140518201020656697335313758999689041588"
}

Request Body For Cancel Order

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

orderId*

Array

OrderId of the transaction

orderType*

Array

Type of the Order. Either "create" or "cancel". By default, "create".

from*

String

Public address of the user.

signature*

String

The signed(signDataTyped) EIP712 creation order.

{
    "dexId": "2202",
    "orderId": "95167",
    "orderType":"cancel",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "signature": "0xe160a1d03e5b0089f44a9dc38674b48be2f0ad0f0b7ee8a623de48985f007c4d5407960fa300abc44b4942a95081c57ba9963f25b8f9a03e209ac507ed3522061b"
}

back to top

/fillorder

This endpoint initiates the transaction to fill the particular limit order.

POST https://api.expand.network/dex/fillorder

Request Body

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

orderId*

Array

The ID of the order to be filled.

amountIn*

Array

The amountin of takerAsset

from*

String

The Taker wallet address which will receive the makerAsset.

gasPriority

String

low, medium, or high.

{
    "dexId": "2202",
    "orderId": "95180",
    "from": "0x42a0eef97019bf6f15796fc9a015f681c581f77a",
    "amountIn": "10000000000000000",
    "gasPriority": "low"
}

back to top

Error Handling Details

ErrorDescription

400 (Bad Request)

Indicates the request is invalid or missing the required parameters. The msg field will contain details about the error.

401 (Unauthorised)

Indicates the request lacks valid authentication credentials (API key). Ensure that you provide a valid API key in the request headers.

404 (Not Found)

Indicates that the specified endpoint or resource does not exist.

500 (Server Error)

Indicates an internal server error.

back to top

Last updated