---
title: /getSupportedCoinsFromExchange
slug: getsupportedcoinsfromexchange
createdAt: 2024-01-09T12:30:00.567Z
---

{
  "id": "pSuQWGyLVnWUpWkegOVUk",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/getSupportedCoinsFromExchange",
    "servers": [
      {
        "url": "http://1.1.1.1/getSupportedCoinsFromExchange"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>\n<p>return - returns all the supported assets for the given exchange</p>\n</li>\n<li>\n<p>example:</p>\n</li>\n</ul>\n<p>getSupportedCoinsFromExchange(1, \"Binance\")</p>\n<p><em><strong>NOTE</strong></em></p>\n<p>The following parameters returned from Binance exchange:</p>\n<ul>\n<li>Message: Message containing list of supported assets</li>\n<li>Status: True or false regarding the operation status</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "account_id",
          "type": "integer",
          "example": 1,
          "description": "The ID of the account involved in this action",
          "default": 1
        },
        {
          "kind": "required",
          "name": "exchange_name",
          "type": "string",
          "example": "Binance",
          "description": "the exchange name",
          "default": "Binance"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "customType": "getSupportedCoinsFromExchangeRequest",
          "schema": [
            {
              "name": "FunctionData",
              "kind": "optional",
              "type": "object",
              "example": "",
              "schema": [
                {
                  "name": "AccountId",
                  "kind": "optional",
                  "type": "integer",
                  "description": "The ID of the user's account.",
                  "example": 1,
                  "default": 1
                },
                {
                  "name": "ExchangeName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The name of the exchange (e.g., \"Binance\").",
                  "example": "Binance",
                  "default": "Binance"
                }
              ]
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokengetSupportedCoinsFromExchange",
              "customType": "MetaTokengetSupportedCoinsFromExchange",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "getSupportedCoinsFromExchange",
                  "default": "getSupportedCoinsFromExchange"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/getSupportedCoinsFromExchangeRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "getSupportedCoinsFromExchangeResponse",
            "schema": [
              {
                "name": "Message",
                "kind": "optional",
                "type": "array",
                "description": "Message containing a list of supported assets.",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "FromAsset",
                    "kind": "optional",
                    "type": "string",
                    "description": "The coin swapped from.",
                    "example": "ETH",
                    "default": "ETH"
                  },
                  {
                    "name": "ToAsset",
                    "kind": "optional",
                    "type": "string",
                    "description": "The coin swapped to.",
                    "example": "USDT",
                    "default": "USDT"
                  },
                  {
                    "name": "FromAssetMinAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The minimum amount of \"FromAsset\" needed for conversion.",
                    "example": 0.1,
                    "default": 0.1
                  },
                  {
                    "name": "FromAssetMaxAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The maximum amount of \"FromAsset\" that can be converted.",
                    "example": 100,
                    "default": 100
                  },
                  {
                    "name": "ToAssetMinAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The minimum amount of \"ToAsset\" needed for conversion.",
                    "example": 10,
                    "default": 10
                  },
                  {
                    "name": "ToAssetMaxAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The maximum amount of \"ToAsset\" that can be converted.",
                    "example": 1000,
                    "default": 1000
                  },
                  {
                    "name": "RawInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "JSON response received from the exchange as is.",
                    "example": "{\"exchange_rate\":3875.52,\"last_updated\":\"2023-11-15T14:30:00Z\",\"liquidity_pool\":\"BinancePool123\",\"available_balance\":25000}",
                    "schema": []
                  }
                ]
              },
              {
                "name": "Status",
                "kind": "optional",
                "type": "boolean",
                "description": "True or false regarding the operation status.",
                "example": "true",
                "default": "true"
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/getSupportedCoinsFromExchangeResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/getSupportedCoinsFromExchange?account_id=1&exchange_name=Binance' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"FunctionData\": {\n     \"AccountId\": 1,\n     \"ExchangeName\": \"Binance\"\n     },\n     \"Meta\": {\n     \"FunctionName\": \"getSupportedCoinsFromExchange\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"ExchangeName\": \"Binance\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getSupportedCoinsFromExchange\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/getSupportedCoinsFromExchange?account_id=1&exchange_name=Binance\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/getSupportedCoinsFromExchange?account_id=1&exchange_name=Binance\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"ExchangeName\": \"Binance\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getSupportedCoinsFromExchange\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/getSupportedCoinsFromExchange?account_id=1&exchange_name=Binance\"\n\npayload = json.dumps({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"ExchangeName\": \"Binance\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getSupportedCoinsFromExchange\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"Message\": [\n    {\n      \"FromAsset\": \"ETH\",\n      \"ToAsset\": \"USDT\",\n      \"FromAssetMinAmount\": 0.1,\n      \"FromAssetMaxAmount\": 100,\n      \"ToAssetMinAmount\": 10,\n      \"ToAssetMaxAmount\": 1000,\n      \"RawInfo\": {}\n    }\n  ],\n  \"Status\": \"true\",\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "_MTYuiUMhcv_Xk5Gom9G6",
      "type": "bulleted-list",
      "children": [
        {
          "id": "sdqLze0sKiSu_hq3RDdxJ",
          "type": "list-item",
          "children": [
            {
              "id": "31qJv8KUBxgfE_P-OCgf6",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - returns all the supported assets for the given exchange",
                  "id": "_zk5Y8JUPK7zlbx8rfAA1"
                }
              ]
            }
          ]
        },
        {
          "id": "3pUk4OLIaHzjhrnmkvoo_",
          "type": "list-item",
          "children": [
            {
              "id": "7Qgce2ZMZmoz-EAqrU4Vh",
              "type": "list-item-child",
              "children": [
                {
                  "text": "example:",
                  "id": "_hVKYHK_9negYy2lmUHaz"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": "_dHwH1jTpzn_MBuiZ8h1Y",
      "type": "paragraph",
      "children": [
        {
          "text": "getSupportedCoinsFromExchange(1, \"Binance\")",
          "id": "yOVncAlS8ieK0oaOFZnGA"
        }
      ]
    },
    {
      "id": "2jPAQn5ztq3Ae9Q52ReJc",
      "type": "paragraph",
      "children": [
        {
          "text": "NOTE",
          "bold": true,
          "italic": true,
          "id": "QO4hEB4-o-Juss100s8-M"
        }
      ]
    },
    {
      "id": "rOOAHZNdaVC-CLJa7iSoV",
      "type": "paragraph",
      "children": [
        {
          "text": "The following parameters returned from Binance exchange:",
          "id": "lNwD7IeFxDPSrLffUM6Rj"
        }
      ]
    },
    {
      "id": "b8JHPOpFVeg1eJtXImbJa",
      "type": "bulleted-list",
      "children": [
        {
          "id": "9fpirE93L-6W6KeVh-oXH",
          "type": "list-item",
          "children": [
            {
              "id": "Q2oMO_xzR_Xm23O0sEPot",
              "type": "list-item-child",
              "children": [
                {
                  "text": "Message: Message containing list of supported assets",
                  "id": "Yqz2XjPrrbRxpEK8IWbDr"
                }
              ]
            }
          ]
        },
        {
          "id": "MkmFVDUey9yvk-97pG7-i",
          "type": "list-item",
          "children": [
            {
              "id": "pRkiubgVbUy_u4WdZYjwG",
              "type": "list-item-child",
              "children": [
                {
                  "text": "Status: True or false regarding the operation status",
                  "id": "d_Joz6PgdX1ewNFvl04Oe"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}