# Get Custom Token

## Custom Token API

Provides token details for a user-specified token that is not included in Rango's official list. Currently supports blockchains based on Solana and EVM.

{% tabs %}
{% tab title="Typescript (SDK)" %}

```typescript
const tokenResponse = await rango.getCustomToken({
    "blockchain": "SOLANA", 
    "address": "3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA"
})
```

{% endtab %}

{% tab title="Node.js (Axios)" %}

```typescript
const response = await axios.get('https://api.rango.exchange/meta/custom-token', {
  params: {
    'blockchain': 'SOLANA',
    'address': '3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA',
    'apiKey': 'c6381a79-2817-4602-83bf-6a641a409e32'
  }
});
```

{% endtab %}

{% tab title="Bash (cURL)" %}

```bash
curl --request GET \
     --url 'https://api.rango.exchange/meta/custom-token?blockchain=SOLANA&address=3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA&apiKey=c6381a79-2817-4602-83bf-6a641a409e32' 
```

{% endtab %}
{% endtabs %}

{% embed url="<https://rango-api.readme.io/reference/getcustomtokendata-1>" %}
Custom Token Swagger
{% endembed %}

### Custom Token Request

{% tabs %}
{% tab title="API Definition" %}

* **`blockchain`**<mark style="color:red;">\*</mark> String
  * Description: The blockchain which the token belongs to.
  * Example: `SOLANA`
* **`address`**<mark style="color:red;">\*</mark> String&#x20;
  * Description: Smart contract address of the token.
  * Example: `3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA`
    {% endtab %}

{% tab title="SDK Models (Typescript)" %}

```typescript
export type CustomTokenRequest = {
  blockchain: string
  address: string
}
```

{% endtab %}
{% endtabs %}

### Custom Token Response

{% tabs %}
{% tab title="API Definition" %}

* **`token`**
  * Description: The token's metadata
* **`error`**
  * Description: Error message if there was any problem
* **`errorCode`**
  * Description: Error code if there was any problem
* **`traceId`**
  * Description: Trace id help Rango support to resolve the issue
    {% endtab %}

{% tab title="SDK Models (Typescript)" %}

```typescript
export type CustomTokenResponse = {
  token: Token
  error: string | null
  errorCode: number | null
  traceId: number | null
}

export type Token = {
  blockchain: string
  address: string | null
  symbol: string
  name: string | null
  decimals: number
  image: string
  usdPrice: number | null
  isSecondaryCoin: boolean
  coinSource: string | null
  coinSourceUrl: string | null
  isPopular: boolean
  supportedSwappers?: string[]
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
  "token": {
    "blockchain": "SOLANA",
    "symbol": "Brett",
    "image": "https://bafkreifi5rkzrqyze3cqoqt5xm6ullqpyh5g52ut46pmwva6cju2yyy3ay.ipfs.nftstorage.link",
    "address": "3yoMkf3X6bDxjks6YaWwNk4SAbuaysLg1a4BjQKToQAA",
    "usdPrice": null,
    "decimals": 9,
    "name": "Brett",
    "isPopular": false,
    "isSecondaryCoin": true,
    "coinSource": null,
    "coinSourceUrl": null,
    "supportedSwappers": []
  },
  "error": null,
  "errorCode": null,
  "traceId": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rango.exchange/api-integration/main-api-multi-step/api-reference/get-custom-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
