swap

List fungibles available for bridging

Changed on

Returns the tokens available for bridging between two chains. Use it to populate a token picker. Only needed for cross-chain swaps: same-chain swaps skip this step.

get/v1/swap/fungibles/

Request

  • Base URL
    https://api.zerion.io
  • URL
    https://api.zerion.io/v1/swap/fungibles/
  • Auth
    HTTP basic

Query parameters

chain_idstring

Chain to send the token from. Defaults to ethereum.

{
  "chain_id": "ethereum"
}
chain_idstring

Chain to receive the token on. Defaults to ethereum.

{
  "chain_id": "polygon"
}
direction'input' | 'output' | 'both'

Which tokens to return, by the direction they can move. Defaults to both.

  • input - tokens the user can send.
  • output - tokens the user can receive.
  • both - tokens the user can both send and receive (the intersection of input and output).

Response

Response for requested list available for bridge fungibles.

Example response

{
  "links": {
    "self": "https://api.zerion.io/v1/swap/fungibles"
  },
  "data": [
    {
      "type": "fungibles",
      "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6",
      "attributes": {
        "name": "Bankless BED Index",
        "symbol": "BED",
        "description": "The BED index is meant to track crypto's top 3 investab.",
        "icon": {
          "url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
        },
        "flags": {
          "verified": true
        },
        "external_links": [
          {
            "type": "website",
            "name": "Website",
            "url": "https://www.indexcoop.com"
          }
        ],
        "implementations": [
          {
            "chain_id": "ethereum",
            "address": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6",
            "decimals": 18,
            "market_data": {
              "trading_volumes": {
                "volume_1d": 40096375.69294812
              }
            },
            "deployment_date": "2020-09-09T11:11:13Z"
          }
        ],
        "market_data": {
          "total_supply": 29905.762448515918,
          "circulating_supply": 29905.762448515918,
          "fully_diluted_valuation": 3196313.736038149,
          "market_cap": 3196313.736038149,
          "price": 106.87952669793131,
          "changes": {
            "percent_1d": -0.7379066649086338,
            "percent_30d": -2.499465618806962,
            "percent_90d": 11.316340269371775
          },
          "trading_volumes": {
            "volume_1d": 40096375.69294812
          }
        }
      },
      "relationships": {
        "chart_hour": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/hour"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-hour"
          }
        },
        "chart_day": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/day"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-day"
          }
        },
        "chart_week": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/week"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-week"
          }
        },
        "chart_month": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/month"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-month"
          }
        },
        "chart_year": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/year"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-year"
          }
        },
        "chart_max": {
          "links": {
            "related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6/charts/max"
          },
          "data": {
            "type": "fungible_charts",
            "id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6-max"
          }
        }
      }
    }
  ]
}

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property //// to the response with the status