swap path

Overview

The /info/swap/path API provides swap path of tokens.

Token swap path

GET /info/swap/path

Returns the token swap path.

Query Parameters

NameTypeDescription

from*

string

from token address

to*

string

to token address

{
  "type": "success",
  "message": "success",
  "data": {
    "swap_path": [
      "string"
    ]
  }
}

Request

Parameter

NameTypeDescription

from

string

from token address

to

string

to token address

Response

Parameter

NameTypeDescription

type

string

success/failure status

message

string

success/failure message

data

-

-

swap_path

string

Swap path of tokens

Sample

Request

curl

curl -X 'GET' \
  'https://openapi.wemix.fi/info/swap/path?from=0x7D72b22a74A216Af4a002a1095C8C707d6eC1C5f&to=0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1' \
  -H 'accept: application/json'

# WWEMIX token address: 0x7D72b22a74A216Af4a002a1095C8C707d6eC1C5f
# WEMIX$ token address: 0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1

Request URL

https://openapi.wemix.fi/info/swap/path?from=0x7D72b22a74A216Af4a002a1095C8C707d6eC1C5f&to=0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1

Response

{
  "type": "success",
  "message": "success",
  "data": {
    "swap_path": [
      "0x7D72b22a74A216Af4a002a1095C8C707d6eC1C5f",
      "0x8E81fCc2d4A3bAa0eE9044E0D7E36F59C9BbA9c1"
    ]
  }
}