Skip to content
Get started

Get swap routes for all denoms

GET/api/v1/swap/routes/all

Get swap routes for all denoms

Query ParametersExpand Collapse
contract_address: string

Swap contract address

ReturnsExpand Collapse
count: number

Total number of objects irrespective of any pagination parameters.

formatuint16
minimum0
maximum65535
data: array of SwapRouteTargetSet { source, targets }
source: string

Source denom for swap routes

targets: array of string

List of target denoms for available swap routes

error: unknown

Error data. Guaranteed null for successful response.

status: number

HTTP status. Successful responses are guaranteed to be < 400. Conversely, error responses are guaranteed to be >= 400.

formatuint16
minimum0
maximum65535
status_text: string

HTTP status text

Get swap routes for all denoms

curl https://api-v2.nept.finance/api/v1/swap/routes/all
{
  "data": [
    {
      "source": "inj",
      "targets": [
        "ibc/F6CC233E5C0EA36B1F74AB1AF98471A2D6A80E2542856639703E908B4D93E7C4",
        "peggy0xAaEf88cEa01475125522e117BFe45cF32044E238"
      ]
    },
    {
      "source": "factory/inj1n636d9gzrqggdk66n2f97th0x8yuhfrtx520e7/ausd",
      "targets": [
        "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9",
        "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7"
      ]
    }
  ],
  "count": 2,
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}
Returns Examples
{
  "data": [
    {
      "source": "inj",
      "targets": [
        "ibc/F6CC233E5C0EA36B1F74AB1AF98471A2D6A80E2542856639703E908B4D93E7C4",
        "peggy0xAaEf88cEa01475125522e117BFe45cF32044E238"
      ]
    },
    {
      "source": "factory/inj1n636d9gzrqggdk66n2f97th0x8yuhfrtx520e7/ausd",
      "targets": [
        "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9",
        "peggy0xdAC17F958D2ee523a2206206994597C13D831ec7"
      ]
    }
  ],
  "count": 2,
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}