Partner API
System status GET
Returns simple answer {"status":"OK"}.
Endpoint
GET https://switchere.com/api/v1/partner/healthcheck
Authentication
headerKey and headerSignature
Response
{
status: "OK"
}
| Name | Type | Description |
|---|---|---|
| status | string | System status |
Order list GET
Returns simple answer {"status":"OK"}.
Endpoint
GET https://switchere.com/api/v1/partner/order/list
Authentication
headerKey and headerSignature
Parameters
| Name | Type | Description |
|---|---|---|
| page | integer | page number |
| rows | integer | how many rows return on one 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,
"partner_order_id": "xxxxx-xxxxx-xxxxx-xxxx1",
}
...
}
| Name | Type | Description |
|---|---|---|
| rows | integer | System status |
| total | tinteger | System status |
| data | array | Array of order data. Each element of the array has fields: created_at, id, partner_order_id |
TIP
created_at- timestampid- internal order idpartner_order_id- external order id
Order data POST
Return order data.
Endpoint
POST https://switchere.com/api/v1/partner/order
Authentication
headerKey and headerSignature
Parameters
| Name | Type | Description |
|---|---|---|
| partner_order_id required | string | unique partner order id |
Response
{
"partner_order_id": "xxxxx-xxxxx-xxxxx-xxxx1",
"payin_amount": 100.01,
"payout_amount": 100.01,
"payin_currency": "USD",
"payout_currency": "BTC",
"payout_txid": "944a88f6331c057f53e0a4d16232a44401ae14874a3d8a6fd30030781e7340ea",
"status": "finished",
"dst_address": "3M97Nfbrnf2yYxYJKJ9S8eZoxRKiq6Frju",
"dst_tag": 0,
"memo_id": "somestring",
"memo_value": "SomeString"
}
| Name | Type | Description |
|---|---|---|
| partner_order_id | string | unique partner order id |
| payin_amount | float | payin currency |
| payout_amount | float | payout amount |
| payin_currency | currency | payin currency |
| payout_currency | currency | payout currency |
| payout_txid | string | txid of payout transaction |
| status | orderStatus | current status of order |
| 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 |
Tip: Field parameters info
Order fee POST
Return data about fee for order.
Endpoint
POST https://switchere.com/api/v1/partner/order/fee
Authentication
`headerKey` and `headerSignature`Parameters
| Name | Type | Description |
|---|---|---|
| partner_order_id required | string | unique partner order id |
| 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
{
"payin_amount": "string",
"payout_amount": "string",
"payin_min_amount": "string",
"payin_max_amount": "string",
"payout_min_amount": "string",
"payout_max_amount": "string",
"rate": "string",
"payin_fee": "string",
"payout_fee": "string",
"margin_fee": "string",
}
| Name | Type | Description |
|---|---|---|
| payin_amount | string | payin amount |
| payout_amount | string | payout amount |
| payin_min_amount | string | payin min amount |
| payin_max_amount | string | payin max amount |
| payout_max_amount | string | payout min amount |
| payout_amount | string | payout max amount |
| rate | string | rate payin_currency/payout_currency |
| payin_fee | string | network fee in payin currency |
| payout_fee | string | network fee in payout currency |
| margin_fee | string | service fee in payin currency |
Tip: Field parameters info
Currencies GET
Return data about partner payin->payout currencies.
Endpoint
GET https://switchere.com/api/v1/partner/currency
Authentication
`headerKey` and `headerSignature`Response
{
"...": [
"...",
"...",
"..."
]
}
| Name | Type | Description |
|---|---|---|
| ... | array | payout currencies |
Payments GET
Return data about partner payments.
Endpoint
GET https://switchere.com/api/v1/partner/payment/{directionName}
Authentication
headerKey and headerSignature
Parameters
| Name | Type | Description |
|---|---|---|
| directionName required | direction | Name of direction. |
Response
[
{
"group": "card",
"info": "USD, EUR",
"list": [
{
"currency": "USD",
"is_crypto": true
}
],
"title": "Credit/Debit Card"
}
]
| Name | Type | Description |
|---|---|---|
| group | paymentGroup | payment group |
| info | string | info for group |
| list | array | array objects contain: currency and is_crypto |
| title | string | title for group |
Tip: Field parameters info
Tickers GET
Return data about partner rates.
Endpoint
GET https://switchere.com/api/v1/partner/ticker
Authentication
headerKey and headerSignature
Response
[
{
"name": "BTC-USD",
"ask": 100.01,
"bid": 99.9
}
]
| Name | Type | Description |
|---|---|---|
| name | string | pair name |
| ask | string | ask |
| bid | string | bid |
Ticker GET
Return data about partner rate.
Endpoint
GET https://switchere.com/api/v1/partner/ticker/{tickerName}
Authentication
headerKey and headerSignature
Parameters
| Name | Type | Description |
|---|---|---|
| tickerName required | string | Example: BTC-USD Name of rate. |
Response
{
"name": "BTC-USD",
"ask": 100.01,
"bid": 99.9
}
| Name | Type | Description |
|---|---|---|
| name | string | pair name |
| ask | string | ask |
| bid | string | bid |
Callback POST
Callbacks to your system.
Endpoint
POST https://your.endpoint.com/callback
Authentication
headerCallbackSignature
Parameters
| Name | Type | Description |
|---|---|---|
| partner_order_id | string | unique partner order id |
| payin_amount | float | payin currency |
| payout_amount | float | payout amount |
| payin_currency | currency | payin currency |
| payout_currency | currency | payout currency |
| status | orderStatus | current status of order |
| 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 |
Tip: Field parameters info
Response
Response is empty
TIP
Also see field parameters.