SageSwap v0.0.2
Scroll down for example requests and responses.
Base URLs:
Currencies
currencies.index
Code samples
GET /v1/currencies
Example responses
200 Response
{
"data": [
{
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 60,
"explorerLink": "https://mempool.space/tx/{{TRANSACTION_ID}}"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of CurrencyResource |
Inline |
| 401 | Unauthorized | Unauthenticated | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | [CurrencyResource] | true | none | none |
| »» CurrencyResource | CurrencyResource | false | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | integer | true | none | none |
| »»» explorerLink | string,null | true | none | none |
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Error overview. |
Rate
rate.show
Code samples
GET /v1/rate
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| input_currency | query | string | true | none |
| output_currency | query | string | true | none |
| input_currency_amount | query | integer | false | none |
| output_currency_amount | query | number,null | false | none |
| high_aml | query | boolean,null | false | Do the coins have high AML and should be processed in AML mode (additional fee, XMR output)? |
Example responses
200 Response
{
"data": {
"inputCurrency": {
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 60
},
"inputCurrencyAmount": 980000000,
"outputCurrency": {
"friendlyId": "xmr_mainnet",
"name": "Monero",
"ticker": "XMR",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 30
},
"outputCurrencyAmount": 184236195790
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | RateResource |
Inline |
| 401 | Unauthorized | Unauthenticated | Inline |
| 422 | Unprocessable Entity | Validation error | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | RateResource | true | none | none |
| »» inputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | integer | true | none | none |
| »» inputCurrencyAmount | integer | true | none | amount (gwei) |
| »» outputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | integer | true | none | none |
| »» outputCurrencyAmount | integer | true | none | amount (gwei) |
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Error overview. |
Status Code 422
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Errors overview. |
| » errors | object | true | none | A detailed description of each field that failed validation. |
| »» additionalProperties | [string] | false | none | none |
Transaction
transaction.show
Code samples
GET /v1/transactions/{uuid}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| uuid | path | string | true | none |
Example responses
200 Response
{
"data": {
"uuid": "e7e54525-b618-43d4-b653-91816200f8aa",
"inputCurrency": {
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "60"
},
"inputCurrencyAmount": 980000000,
"inputCurrencyAddress": "bc1pnv8748tknqhrm866d8sqc8ujzrzslz0h5kpnngrxu53wjenck0yst47dfh",
"outputCurrency": {
"friendlyId": "xmr_mainnet",
"name": "Monero",
"ticker": "XMR",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "30"
},
"outputCurrencyAmount": 184236195790,
"outputCurrencyAmountOriginal": 184236195790,
"outputCurrencyAddress": "41gBZ1Xu9bcPMa1KoCeiNoYAKHvGogPTvgpm6B6bodRoYzX9Mt2MSa2JpTzZMKRpCCXReaSPkj4MVEahEJzQmpCr2SpuyG7",
"status": "NEW",
"inputCurrencyTransactionId": "c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"inputCurrencyTransactionExplorerLink": "https://mempool.space/tx/c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"outputCurrencyTransactionId": null,
"outputCurrencyTransactionExplorerLink": null,
"refundAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | TransactionResource |
Inline |
| 401 | Unauthorized | Unauthenticated | Inline |
| 404 | Not Found | none | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | TransactionResource | true | none | none |
| »» uuid | string | true | none | none |
| »» inputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | string | true | none | none |
| »» inputCurrencyAmount | integer | true | none | amount (gwei) |
| »» inputCurrencyAddress | string | true | none | none |
| »» outputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | string | true | none | none |
| »» outputCurrencyAmount | integer | true | none | amount (gwei) |
| »» outputCurrencyAmountOriginal | integer | true | none | amount (gwei) - original amount not including floating rate deviation |
| »» outputCurrencyAddress | string | true | none | none |
| »» status | TransactionStatusEnum | true | none | none |
| »» inputCurrencyTransactionId | string,null | true | none | none |
| »» inputCurrencyTransactionExplorerLink | string | true | none | none |
| »» outputCurrencyTransactionId | string,null | true | none | none |
| »» outputCurrencyTransactionExplorerLink | string | true | none | none |
| »» refundAddress | string | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| status | NEW |
| status | WAITING_FOR_CONFIRMATIONS |
| status | SENDING |
| status | SUCCESS |
| status | EXPIRED |
| status | ERROR |
| status | REFUNDED |
| status | CONTACT_SUPPORT |
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Error overview. |
Status Code 404
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | none |
| » error_code | ApiErrorCodeEnum | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| message | Transaction not found |
| error_code | access_forbidden |
| error_code | transaction_not_found |
| error_code | validation_error |
| error_code | server_error |
transaction.create
Code samples
POST /v1/transactions
Body parameter
{
"input_currency": "btc_mainnet",
"output_currency": "xmr_mainnet",
"input_currency_amount": 980000000,
"output_currency_amount": null,
"output_currency_address": "41gBZ1Xu9bcPMa1KoCeiNoYAKHvGogPTvgpm6B6bodRoYzX9Mt2MSa2JpTzZMKRpCCXReaSPkj4MVEahEJzQmpCr2SpuyG7",
"refund_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"high_aml": false
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateTransactionRequest | true | none |
Example responses
200 Response
{
"data": {
"uuid": "e7e54525-b618-43d4-b653-91816200f8aa",
"inputCurrency": {
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "60"
},
"inputCurrencyAmount": 980000000,
"inputCurrencyAddress": "bc1pnv8748tknqhrm866d8sqc8ujzrzslz0h5kpnngrxu53wjenck0yst47dfh",
"outputCurrency": {
"friendlyId": "xmr_mainnet",
"name": "Monero",
"ticker": "XMR",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "30"
},
"outputCurrencyAmount": 184236195790,
"outputCurrencyAmountOriginal": 184236195790,
"outputCurrencyAddress": "41gBZ1Xu9bcPMa1KoCeiNoYAKHvGogPTvgpm6B6bodRoYzX9Mt2MSa2JpTzZMKRpCCXReaSPkj4MVEahEJzQmpCr2SpuyG7",
"status": "NEW",
"inputCurrencyTransactionId": "c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"inputCurrencyTransactionExplorerLink": "https://mempool.space/tx/c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"outputCurrencyTransactionId": null,
"outputCurrencyTransactionExplorerLink": null,
"refundAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | TransactionResource |
Inline |
| 401 | Unauthorized | Unauthenticated | Inline |
| 422 | Unprocessable Entity | Validation error | Inline |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | TransactionResource | true | none | none |
| »» uuid | string | true | none | none |
| »» inputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | string | true | none | none |
| »» inputCurrencyAmount | integer | true | none | amount (gwei) |
| »» inputCurrencyAddress | string | true | none | none |
| »» outputCurrency | object | true | none | none |
| »»» friendlyId | string | true | none | none |
| »»» name | string | true | none | none |
| »»» ticker | string | true | none | none |
| »»» network | object | true | none | none |
| »»»» name | string | true | none | none |
| »»» transactionTtlMinutes | string | true | none | none |
| »» outputCurrencyAmount | integer | true | none | amount (gwei) |
| »» outputCurrencyAmountOriginal | integer | true | none | amount (gwei) - original amount not including floating rate deviation |
| »» outputCurrencyAddress | string | true | none | none |
| »» status | TransactionStatusEnum | true | none | none |
| »» inputCurrencyTransactionId | string,null | true | none | none |
| »» inputCurrencyTransactionExplorerLink | string | true | none | none |
| »» outputCurrencyTransactionId | string,null | true | none | none |
| »» outputCurrencyTransactionExplorerLink | string | true | none | none |
| »» refundAddress | string | true | none | none |
Enumerated Values
| Property | Value |
|---|---|
| status | NEW |
| status | WAITING_FOR_CONFIRMATIONS |
| status | SENDING |
| status | SUCCESS |
| status | EXPIRED |
| status | ERROR |
| status | REFUNDED |
| status | CONTACT_SUPPORT |
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Error overview. |
Status Code 422
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | true | none | Errors overview. |
| » errors | object | true | none | A detailed description of each field that failed validation. |
| »» additionalProperties | [string] | false | none | none |
Schemas
ApiErrorCodeEnum
"access_forbidden"
ApiErrorCodeEnum
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ApiErrorCodeEnum | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| ApiErrorCodeEnum | access_forbidden |
| ApiErrorCodeEnum | transaction_not_found |
| ApiErrorCodeEnum | validation_error |
| ApiErrorCodeEnum | server_error |
CreateTransactionRequest
{
"input_currency": "btc_mainnet",
"output_currency": "xmr_mainnet",
"input_currency_amount": 980000000,
"output_currency_amount": null,
"output_currency_address": "41gBZ1Xu9bcPMa1KoCeiNoYAKHvGogPTvgpm6B6bodRoYzX9Mt2MSa2JpTzZMKRpCCXReaSPkj4MVEahEJzQmpCr2SpuyG7",
"refund_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"high_aml": false
}
CreateTransactionRequest
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| input_currency | string | true | none | none |
| output_currency | string | true | none | none |
| input_currency_amount | integer | false | none | none |
| output_currency_amount | number,null | false | none | none |
| output_currency_address | string | false | none | none |
| refund_address | string,null | false | none | none |
| high_aml | boolean,null | false | none | Do the coins have high AML and should be processed in AML mode (additional fee, XMR output)? |
CurrencyResource
{
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 60,
"explorerLink": "https://mempool.space/tx/{{TRANSACTION_ID}}"
}
CurrencyResource
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| friendlyId | string | true | none | none |
| name | string | true | none | none |
| ticker | string | true | none | none |
| network | object | true | none | none |
| » name | string | true | none | none |
| transactionTtlMinutes | integer | true | none | none |
| explorerLink | string,null | true | none | none |
RateResource
{
"inputCurrency": {
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 60
},
"inputCurrencyAmount": 980000000,
"outputCurrency": {
"friendlyId": "xmr_mainnet",
"name": "Monero",
"ticker": "XMR",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": 30
},
"outputCurrencyAmount": 184236195790
}
RateResource
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| inputCurrency | object | true | none | none |
| » friendlyId | string | true | none | none |
| » name | string | true | none | none |
| » ticker | string | true | none | none |
| » network | object | true | none | none |
| »» name | string | true | none | none |
| » transactionTtlMinutes | integer | true | none | none |
| inputCurrencyAmount | integer | true | none | amount (gwei) |
| outputCurrency | object | true | none | none |
| » friendlyId | string | true | none | none |
| » name | string | true | none | none |
| » ticker | string | true | none | none |
| » network | object | true | none | none |
| »» name | string | true | none | none |
| » transactionTtlMinutes | integer | true | none | none |
| outputCurrencyAmount | integer | true | none | amount (gwei) |
TransactionResource
{
"uuid": "e7e54525-b618-43d4-b653-91816200f8aa",
"inputCurrency": {
"friendlyId": "btc_mainnet",
"name": "Bitcoin",
"ticker": "BTC",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "60"
},
"inputCurrencyAmount": 980000000,
"inputCurrencyAddress": "bc1pnv8748tknqhrm866d8sqc8ujzrzslz0h5kpnngrxu53wjenck0yst47dfh",
"outputCurrency": {
"friendlyId": "xmr_mainnet",
"name": "Monero",
"ticker": "XMR",
"network": {
"name": "Mainnet"
},
"transactionTtlMinutes": "30"
},
"outputCurrencyAmount": 184236195790,
"outputCurrencyAmountOriginal": 184236195790,
"outputCurrencyAddress": "41gBZ1Xu9bcPMa1KoCeiNoYAKHvGogPTvgpm6B6bodRoYzX9Mt2MSa2JpTzZMKRpCCXReaSPkj4MVEahEJzQmpCr2SpuyG7",
"status": "NEW",
"inputCurrencyTransactionId": "c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"inputCurrencyTransactionExplorerLink": "https://mempool.space/tx/c3db9ab769e7cea109c979df3f8af2881760e9d53f3045df99ebd6021919904b",
"outputCurrencyTransactionId": null,
"outputCurrencyTransactionExplorerLink": null,
"refundAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}
TransactionResource
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| uuid | string | true | none | none |
| inputCurrency | object | true | none | none |
| » friendlyId | string | true | none | none |
| » name | string | true | none | none |
| » ticker | string | true | none | none |
| » network | object | true | none | none |
| »» name | string | true | none | none |
| » transactionTtlMinutes | string | true | none | none |
| inputCurrencyAmount | integer | true | none | amount (gwei) |
| inputCurrencyAddress | string | true | none | none |
| outputCurrency | object | true | none | none |
| » friendlyId | string | true | none | none |
| » name | string | true | none | none |
| » ticker | string | true | none | none |
| » network | object | true | none | none |
| »» name | string | true | none | none |
| » transactionTtlMinutes | string | true | none | none |
| outputCurrencyAmount | integer | true | none | amount (gwei) |
| outputCurrencyAmountOriginal | integer | true | none | amount (gwei) - original amount not including floating rate deviation |
| outputCurrencyAddress | string | true | none | none |
| status | TransactionStatusEnum | true | none | none |
| inputCurrencyTransactionId | string,null | true | none | none |
| inputCurrencyTransactionExplorerLink | string | true | none | none |
| outputCurrencyTransactionId | string,null | true | none | none |
| outputCurrencyTransactionExplorerLink | string | true | none | none |
| refundAddress | string | true | none | none |
TransactionStatusEnum
"NEW"
TransactionStatusEnum
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| TransactionStatusEnum | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| TransactionStatusEnum | NEW |
| TransactionStatusEnum | WAITING_FOR_CONFIRMATIONS |
| TransactionStatusEnum | SENDING |
| TransactionStatusEnum | SUCCESS |
| TransactionStatusEnum | EXPIRED |
| TransactionStatusEnum | ERROR |
| TransactionStatusEnum | REFUNDED |
| TransactionStatusEnum | CONTACT_SUPPORT |