Client
POST
Order createCreate new client order.
Endpoint
POST https://switchere.com/api/v2/client/order/create
Parameters
Name | Type | Description |
---|---|---|
payin_currency required | currency | Payin currency. |
payin_amount | float | Payin amount. One of payin_amount , payout_amount is required. |
payin_group | paymentGroup | If empty, will be choosen first available method for payin currency. See order in enum. |
payout_currency required | currency | Payout currency. |
payout_amount | float | Payout amount. One of payin_amount , payout_amount is required. |
payout_group | paymentGroup | If empty, will be choosen first available method for payout currency. See order in enum. |
dst_address | string | Destination address. |
memo | string | Crypto memo. |
coupon | string | Switchere coupon. |
free_first | integer[0..1] | Enable or disable free first order policy. By default free_first = 1 . |
Regular Order Response
{
"client_order_id": "XXXXX-XXXXXX",
"created_at": "2020-11-10 13:51:34.864116",
"crypto_address": null,
"crypto_delay": null,
"dst_address": "2NA5XzyXXxNZVQkzaXxxEcjnLbNkxxxXXXX",
"payin_amount": "100.000000000000000000",
"payin_currency": "USD",
"payin_group": "card",
"payin_txid": null,
"payout_amount": "0.003783150000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"redirect": "https://switchere.com/onramp/partner/o/XXXXX-XXXXXX",
"status": "payin_pending",
"success": 1
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id. |
created_at | datetime | Order creation time. |
crypto_address | string | Crypto address for balance order type. |
crypto_delay | integer[0..900] | Crypto address expiration time. |
dst_address | string | Destination address. |
payin_amount | float | Payin amount. |
payin_currency | currency | Payin currency. |
payin_group | paymentGroup | Payin group. |
payin_txid | string | Payin TXID. |
payout_amount | float | Payout amount. |
payout_currency | currency | Payout currency. |
payout_group | paymentGroup | Payout group. |
redirect | URL | Payment page URL. |
status | orderStatus | Status of created order. |
Withdrawal Order Response
{
"client_order_id": "AAAAA-BBBBBB",
"uuid": "00000000-0000-0000-0000-000000000000",
"expiration_time_sec": "1682069067"
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id is used to indify your order. |
uuid | string | Unique Switchere order uuid is used to approve your withdrawal. |
expiration_time_sec | timestamp | lifetime of your code. |
Tip: Approve Withdrawal
We send a special 6-digit code for each withdrawal order as a callback to your system.
This code is used as a confirmation of your withdrawal.
You can read more about withdrawal confirmation here.
POST
Confirm WithdrawalConfirm a withdrawal order.
Endpoint
POST https://switchere.com/api/v2/client/order/confirm
Parameters
Name | Type | Description |
---|---|---|
uuid | string | Unique Switchere order uuid generated by order creation. |
code | string | Unique 6-digit Switchere code sent as a callback message. |
Response
{
"client_order_id": "XXXXX-XXXXXX",
"created_at": "2020-11-10 13:51:34.864116",
"crypto_address": null,
"crypto_delay": null,
"dst_address": "2NA5XzyXXxNZVQkzaXxxEcjnLbNkxxxXXXX",
"payin_amount": "100.000000000000000000",
"payin_currency": "USD",
"payin_group": "card",
"payin_txid": null,
"payout_amount": "0.003783150000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"status": "processing",
"success": 1
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id. |
created_at | datetime | Order creation time. |
crypto_address | string | Crypto address for balance order type. |
crypto_delay | integer[0..900] | Crypto address expiration time. |
dst_address | string | Destination address. |
payin_amount | float | Payin amount. |
payin_currency | currency | Payin currency. |
payin_group | paymentGroup | Payin group. |
payin_txid | string | Payin TXID. |
payout_amount | float | Payout amount. |
payout_currency | currency | Payout currency. |
payout_group | paymentGroup | Payout group. |
status | orderStatus | Status of created order. |
Tip: Field parameters info
GET
Order listReturn all client orders info.
Endpoint
GET https://switchere.com/api/v2/client/order/list
Parameters
Name | Type | Description |
---|---|---|
page | integer | Page number. |
rows | integer | Amount of rows returned per page. |
timestamp | unix_timestamp_string | Select orders created only from a ceratin timestamp. |
Response
{
"rows": 50,
"total": 110,
"data": {
"created_at": "1621409585.000000",
"id": 123,
"client_order_id": "xxxxx-xxxxx-xxxxx-xxxx1",
}
...
}
Name | Type | Description |
---|---|---|
rows | integer | Amount of rows returned per page. |
total | tinteger | Overall amount of rows. |
data | array | Array of order data. Each element of the array has fields: created_at , id , client_order_id . |
TIP
created_at
- timestampid
- internal order idclient_order_id
- Switchere order id
POST
Order feeReturn data about fee for an order.
Endpoint
POST https://switchere.com/api/v2/client/order/fee
Parameters
Name | Type | Description |
---|---|---|
payin_currency required | currency | Payin currency. |
payin_amount | float | Payin amount. One of payin_amount , payout_amount is required. |
payin_group | paymentGroup | If empty, will be choosen first available method for payin currency. See order in enum. |
payout_currency required | currency | Payout currency |
payout_amount | float | Payout amount. One of payin_amount , payout_amount is required. |
payout_group | paymentGroup | If empty, will be choosen first available method for payout currency. See order in enum. |
free_first | integer[0..1] | Enable or disable free first order policy. By default free_first = 1 . |
Response
{
"margin_fee": "0",
"payin_amount": "1",
"payin_fee": "0",
"payin_max_amount": "5402532",
"payin_min_amount": "10",
"payout_amount": "0",
"payout_fee": "0.0005",
"payout_max_amount": "100",
"payout_min_amount": "0.00001",
"rate": "59705.882352941176470588",
"limits": {
"client_limit_in_payin_currency": "42043.233898",
"verification_level": "address"
}
}
Name | Type | Description |
---|---|---|
payin_amount | float | Payin amount. |
payout_amount | float | Payout amount |
payin_min_amount | float | Payin min amount. |
payin_max_amount | float | Payin max amount. |
payout_amount | float | Payout max amount. |
payout_max_amount | float | Payout min amount. |
rate | float | Rate payin_currency/payout_currency . |
payin_fee | float | Network fee in payin currency. |
payout_fee | float | Network fee in payout currency. |
margin_fee | float | Service fee in payin currency. |
limits | dict | Client's limit info where stored client limit in payin_currency and verification level. |
Tip: Field parameters info
GET
Order dataReturn the data of a specific order.
Endpoint
GET https://switchere.com/api/v2/client/order/{client_order_id}
Parameters
Name | Type | Description |
---|---|---|
client_order_id required | string | Unique client order id. |
Response
{
"client_country": "GB",
"client_order_id": "XXXXX-XXXXXX",
"country_by_ip": "GB",
"created_at": 1655890695.8389,
"dst_address": "2NA5HzyLQJNZVQkzacroEcjnLbNkcmuUbFQ",
"payin_amount": "30.000000000000000000",
"payin_amount_eur": "30.000000000000000000000000000000000000",
"payin_currency": "EUR",
"payin_group": "card",
"payout_amount": "0.000913590000000000",
"payout_amount_eur": "17.677966500000000000000000000000000000000000000000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"payout_method": "crypto",
"service_fee_amount": "1.020000000000000000",
"service_fee_amount_eur": "1.020000000000000000000000000000000000",
"service_fee_percent": "3.4000",
"status": "pending",
"status_log":[
{
"at": 1655890696.0,
"status": "payin_pending"
},
{
"at": 1655890775.0,
"status": "processing"
},
{
"at": 1655892607.0,
"status": "pending"
}
]
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique client order id. |
payin_amount | float | Payin currency. |
payin_amount_eur | float | Payin currency in EUR. |
payout_amount | float | Payout amount. |
payout_amount_eur | float | Payout amount in EUR. |
service_fee_amount | float | Switchere fee. |
service_fee_amount_eur | float | Switchere fee in EUR. |
service_fee_percent | float | Switchere fee percent. |
payin_currency | currency | Payin currency. |
payout_currency | currency | Payout currency. |
payin_group | paymentGroup | Payin payment group. |
payout_group | paymentGroup | Payout payment group. |
payin_method | paymentMethod | Payin payment method. |
payout_method | paymentMethod | Payout payment method. |
payout_txid | string | TXID of payout transaction. |
status | orderStatus | Current status of order. |
card_type | cardType | Client card type. |
card_number | string | Client card number. |
payin_card_country | country code | Client card country. |
dst_address | string | Wallet address where Switchere will send cryptocurrency. |
dst_tag | integer[0..4294967295] | Tag for XRP address. |
memo_id | string | MEMO_ID for EOS address. |
memo_value | string | MEMO_VALUE for XLM address. |
client_country | country code | Client registration country. |
country_by_ip | country code | Client last login country by IP. |
created_at | unix_timestamp_string | Timestamp when irder was created. |
status_log | order status log | Order status log. |
Tip:
Field parameters info here
GET
BalanceReturn your client balance for all currencies.
Endpoint
GET https://switchere.com/api/v2/client/balance
Response
[
{
"amount": "235.977952000000000000",
"currency": "USDTSW"
},
{
"amount": "0.830050000000000000",
"currency": "ETH"
},
{
"amount": "0.000208200000000000",
"currency": "BTC"
},
{
"amount": "0.000000000000000000",
"currency": "USDCSW"
}
]
Name | Type | Description |
---|---|---|
amount | float | Balance amount for a specific currency. |
currency | currency | Balance currency code. |
Tip: Field parameters info
GET
Balance for a specific currencyReturn your client balance for a specific currency.
Endpoint
GET https://switchere.com/api/v2/client/balance/{currencyCode}
Parameters
Name | Type | Description |
---|---|---|
currencyCode required | currency | Example: BTC Balance currecny code. |
Response
{
"amount": "235.977952000000000000",
"currency": "USDTSW"
}
Name | Type | Description |
---|---|---|
amount | float | Balance amount for a specific currency. |
currency | currency | Balance currency code. |
Tip: Field parameters info