πŸ“ƒChainge 2.0 API Documentation

In 2.0, Submit order request is deprecated. Now you need to call contract ABI's for a swap order.

  1. Supported Chains & Tokens

Get Chainge Supported Chains

GET https://api2.chainge.finance/v1/getChain

{
  "code": 0,
  "data": {
    "version": 0,
    "list": [...]
  },
  "msg": "string",
}

Get Chainge Supported Tokens

GET https://api2.chainge.finance/v1/getAssets

{
  "code": 0,
  "data": {
    "version": 0,
    "list": [...]
  },
  "msg": "string",
}

Get Chainge Supported Tokens for a specified chain

GET https://api2.chainge.finance/v1/getAssetsByChain

Query Parameters

Name
Type
Description

chain*

String

chain name string from getChain API

  1. Quote

Get a quote for a cross chain transaction

GET https://api2.chainge.finance/v1/getBridgeQuote

Query Parameters

Name
Type
Description

amount*

String

User input quantity(Ex: 100000, 1 USDTοΌ‰

symbol*

String

from token symbol from supported Tokens API request result

fromChain*

String

from chain nickName from supported Chains API request result

toChain*

String

from chain nickName from supported Chains API request result

Get a quote for a cross chain aggregator transaction

GET https://api2.chainge.finance/v1/getAggregateQuote

Query Parameters

Name
Type
Description

fromAmount*

String

User input quantity(Ex: 100000, 1 USDTοΌ‰

fromTokenAddress*

String

from token contract address from supported Tokens API request result

fromDecimal*

String

from token contract decimal from supported Tokens API request result

fromChain*

String

from chain nickName from supported Chains API request result

toTokenAddress*

String

from token contract address from supported Tokens API request result

toDecimal*

String

from token contract decimal from supported Tokens API request result

toChain*

String

from chain nickName from supported Chains API request result

  1. Swap

Get direct exchange trading information

GET https://api2.chainge.finance/v1/getAggregateSwap

Query Parameters

Name
Type
Description

fromAmount*

String

User input quantity(eg: 100000, 1 USDTοΌ‰

fromTokenAddress*

String

from token contract address from supported Tokens API request result

fromDecimal*

String

from token contract decimal from supported Tokens API request result

toTokenAddress*

String

from token contract address from supported Tokens API request result

toDecimal*

String

from token contract decimal from supported Tokens API request result

chain*

String

from chain nickName from supported Chains API request result

aggregator

String

from Aggregator Quote API request result

sender*

String

User address

recipient*

String

Receiver address

slippage*

String

slippage(eg: 100 === 1%)

allowPartialFill*

Boolean

true

routeSummary

String

from Aggregator Quote API request result

  1. Order

Submit order

POST https://api2.chainge.finance/v1/submitOrder

Headers

Name
Type
Description

Evmaddress*

String

Current user address

Signature*

String

Signature info

Request Body

Name
Type
Description

channel*

String

Apply to Chaing.Finance

execStrategy*

String

Default Value: ""

extra*

String

Default Value: ""

orderType*

String

Cross Chain: 1

Aggregate:2

slippage*

String

Cross Chain: 0

Aggregate: (eg: 100 == 1%)

sourceCerts*

String

Order information,Hex string

timeout*

String

Default: 0

toAddr*

String

Receiver address

toChain

String

from supported Chains API request result

toIndex*

String

from token index from supported Tokens API request result

triggerPrice*

String

Default: 0

Check order status

GET https://api2.chainge.finance/v1/checkOrder

Query Parameters

Name
Type
Description

id*

String

from Submit order API request result

  1. Other helpful APIs

Get user balance

GET https://api2.chainge.finance/v1/getBalance

Query Parameters

Name
Type
Description

chain*

String

from supported Chains API request result

contractAddress*

String

from supportd Tokens API request result

address*

String

user address

Get token price

GET https://api2.chainge.finance/v1/getPrice

Query Parameters

Name
Type
Description

chain*

String

from supported Chains API request result

contractAddress*

String

from supportd Tokens API request result

symbol*

String

from supportd Tokens API request result

  1. Ticket

Submit ticket

POST https://api2.chainge.finance/v1/submitTicket

Headers

Name
Type
Description

EvmAddress*

String

User address

Signature*

String

Signature Info

Request Body

Name
Type
Description

hash

String

Problematic transaction hash

chain

String

from supported Chains API request result

Get tickets for user address

GET https://api2.chainge.finance/v1/getAllTicketByAddress

Query Parameters

Name
Type
Description

address*

String

user address

filter*

String

status(eg: Unknown, Pending, Succeeded)

Check ticket status

GET https://api2.chainge.finance/v1/checkTicket

Query Parameters

Name
Type
Description

ticketId*

String

from getAllTicketByAddress Api return result

Last updated

Was this helpful?