Client

Order create POST

Create new client order.

Endpoint

POST https://switchere.com/api/v2/client/order/create

Parameters

NameTypeDescription
payin_currency requiredcurrencyPayin currency.
payin_amountfloatPayin amount. One of payin_amount, payout_amount is required.
payin_grouppaymentGroupIf empty, will be choosen first available method for payin currency. See order in enum.
payout_currency requiredcurrencyPayout currency.
payout_amountfloatPayout amount. One of payin_amount, payout_amount is required.
payout_grouppaymentGroupIf empty, will be choosen first available method for payout currency. See order in enum.
dst_addressstringDestination address.
memostringCrypto memo.
couponstringSwitchere coupon.
free_firstinteger[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
}
NameTypeDescription
client_order_idstringUnique Switchere order id.
created_atdatetimeOrder creation time.
crypto_addressstringCrypto address for balance order type.
crypto_delayinteger[0..900]Crypto address expiration time.
dst_addressstringDestination address.
payin_amountfloatPayin amount.
payin_currencycurrencyPayin currency.
payin_grouppaymentGroupPayin group.
payin_txidstringPayin TXID.
payout_amountfloatPayout amount.
payout_currencycurrencyPayout currency.
payout_grouppaymentGroupPayout group.
redirectURLPayment page URL.
statusorderStatusStatus of created order.

Withdrawal Order Response

{
    "client_order_id": "AAAAA-BBBBBB",
    "uuid": "00000000-0000-0000-0000-000000000000",
    "expiration_time_sec": "1682069067"
}
NameTypeDescription
client_order_idstringUnique Switchere order id is used to indify your order.
uuidstringUnique Switchere order uuid is used to approve your withdrawal.
expiration_time_sectimestamplifetime 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.

Confirm Withdrawal POST

Confirm a withdrawal order.

Endpoint

POST https://switchere.com/api/v2/client/order/confirm

Parameters

NameTypeDescription
uuidstringUnique Switchere order uuid generated by order creation.
codestringUnique 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
}
NameTypeDescription
client_order_idstringUnique Switchere order id.
created_atdatetimeOrder creation time.
crypto_addressstringCrypto address for balance order type.
crypto_delayinteger[0..900]Crypto address expiration time.
dst_addressstringDestination address.
payin_amountfloatPayin amount.
payin_currencycurrencyPayin currency.
payin_grouppaymentGroupPayin group.
payin_txidstringPayin TXID.
payout_amountfloatPayout amount.
payout_currencycurrencyPayout currency.
payout_grouppaymentGroupPayout group.
statusorderStatusStatus of created order.

Tip: Field parameters info

Order list GET

Return all client orders info.

Endpoint

GET https://switchere.com/api/v2/client/order/list

Parameters

NameTypeDescription
pageintegerPage number.
rowsintegerAmount of rows returned per page.
timestampunix_timestamp_stringSelect 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",
    }
    ...
}
NameTypeDescription
rowsintegerAmount of rows returned per page.
totaltintegerOverall amount of rows.
dataarrayArray of order data. Each element of the array has fields: created_at, id, client_order_id.

TIP

  • created_at - timestamp
  • id - internal order id
  • client_order_id - Switchere order id

Order fee POST

Return data about fee for an order.

Endpoint

POST https://switchere.com/api/v2/client/order/fee

Parameters

NameTypeDescription
payin_currency requiredcurrencyPayin currency.
payin_amountfloatPayin amount. One of payin_amount, payout_amount is required.
payin_grouppaymentGroupIf empty, will be choosen first available method for payin currency. See order in enum.
payout_currency requiredcurrencyPayout currency
payout_amountfloatPayout amount. One of payin_amount, payout_amount is required.
payout_grouppaymentGroupIf empty, will be choosen first available method for payout currency. See order in enum.
free_firstinteger[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"
    }
}
NameTypeDescription
payin_amountfloatPayin amount.
payout_amountfloatPayout amount
payin_min_amountfloatPayin min amount.
payin_max_amountfloatPayin max amount.
payout_amountfloatPayout max amount.
payout_max_amountfloatPayout min amount.
ratefloatRate payin_currency/payout_currency.
payin_feefloatNetwork fee in payin currency.
payout_feefloatNetwork fee in payout currency.
margin_feefloatService fee in payin currency.
limitsdictClient's limit info where stored client limit in payin_currency and verification level.

Tip: Field parameters info

Order data GET

Return the data of a specific order.

Endpoint

GET https://switchere.com/api/v2/client/order/{client_order_id}

Parameters

NameTypeDescription
client_order_id requiredstringUnique 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"
        }
    ]
}
NameTypeDescription
client_order_idstringUnique client order id.
payin_amountfloatPayin currency.
payin_amount_eurfloatPayin currency in EUR.
payout_amountfloatPayout amount.
payout_amount_eurfloatPayout amount in EUR.
service_fee_amountfloatSwitchere fee.
service_fee_amount_eurfloatSwitchere fee in EUR.
service_fee_percentfloatSwitchere fee percent.
payin_currencycurrencyPayin currency.
payout_currencycurrencyPayout currency.
payin_grouppaymentGroupPayin payment group.
payout_grouppaymentGroupPayout payment group.
payin_methodpaymentMethodPayin payment method.
payout_methodpaymentMethodPayout payment method.
payout_txidstringTXID of payout transaction.
statusorderStatusCurrent status of order.
card_typecardTypeClient card type.
card_numberstringClient card number.
payin_card_countrycountry codeClient card country.
dst_addressstringWallet address where Switchere will send cryptocurrency.
dst_taginteger[0..4294967295]Tag for XRP address.
memo_idstringMEMO_ID for EOS address.
memo_valuestringMEMO_VALUE for XLM address.
client_countrycountry codeClient registration country.
country_by_ipcountry codeClient last login country by IP.
created_atunix_timestamp_stringTimestamp when irder was created.
status_logorder status logOrder status log.

Tip:

Field parameters info here

Balance GET

Return 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"
    }
]
NameTypeDescription
amountfloatBalance amount for a specific currency.
currencycurrencyBalance currency code.

Tip: Field parameters info

Balance for a specific currency GET

Return your client balance for a specific currency.

Endpoint

GET https://switchere.com/api/v2/client/balance/{currencyCode}

Parameters

NameTypeDescription
currencyCode requiredcurrencyExample: BTC
Balance currecny code.

Response

{
    "amount": "235.977952000000000000",
    "currency": "USDTSW"
}
NameTypeDescription
amountfloatBalance amount for a specific currency.
currencycurrencyBalance currency code.

Tip: Field parameters info

Last Updated: