Pair
GET/pair/:from/:to
Returns the minimum and maximum deposit amount and the rate for a pair of coins.
from
and to
can be coin-network
or if network
is omitted, it will default to the mainnet
. E.g eth-ethereum
, eth-mainnet
or eth
all refer to ETH on the Ethereum network. eth-arbitrum
refers to ETH on Arbitrum network.
The rate is determined after incorporating network fees. Without specifying an amount
, the system will assume a deposit value of 500 USD
. This can be adjusted by adding the amount
query parameter.
Rate Example Computations
- BTC price: 30000 USD
- USDT price: 1 USD
- depositCoin: USDT
- depositNetwork: ethereum
- settleCoin: BTC
- USDT receiving fee: 10 USD
- BTC sending fee: 5 USD
- Default deposit amount: 500 USD
/pair/usdt-eth/btc
Without specifying the amount at the endpoint, we can calculate the rate as follows:
Rate X = ( default deposit amount - (USDT receiving fee + BTC sending fee) / default deposit amount) / BTC price
Rate X = 0.000032333333333
/pair/usdt-eth/btc?amount=10000
With a specified amount at the endpoint, such as 10000, we can calculate the rate as follows:
Rate Y = ( specified amount - (USDT receiving fee + BTC sending fee) / specified amount) / BTC price
Rate Y = 0.000033283333333
With a specified amount of 10000, the rate is higher. This is because the 15 USD combined network fee has a reduced impact on larger shifts, making it less significant in the overall cost of the 500 USD shift.
Request
Path Parameters
from stringrequired
to stringrequired
Query Parameters
amount number
Responses
- 200
- 400
- 500
OK
- application/json
- Schema
- Example
Schema
min stringrequired
max stringrequired
rate stringrequired
depositCoin stringrequired
settleCoin stringrequired
depositNetwork stringrequired
settleNetwork stringrequired
{
"min": "0.0.00010771",
"max": "1.43608988",
"rate": "17.298009817772",
"depositCoin": "BTC",
"settleCoin": "ETH",
"depositNetwork": "bitcoin",
"settleNetwork": "ethereum"
}
Bad Request
- application/json
- Schema
- Example
Schema
error object
message stringrequired
{
"error": {
"message": "Cannot shift between the same coin network pair"
}
}
Internal Server Error
- application/json
- Schema
- Examples
Schema
error object
message stringrequired
{
"error": {
"message": "Shift unavailable"
}
}
{
"error": {
"message": "Invalid coin"
}
}
{
"error": {
"message": "Invalid network"
}
}
{
"error": {
"message": "Amount is above the maximum of 30000 USDT"
}
}
{
"error": {
"message": "Amount is below the minimum of 3 USDT"
}
}
Loading...