---
title: "Gate REST Get OTCBank List JavaScript SDK Example | Siebly"
description: "Gate REST get otcbank list JavaScript example for the Siebly Gate SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs."
canonical: "https://siebly.io/examples/Gate/Rest/otc/getOTCBankList"
robots: "index,follow"
---

# Gate REST Get OTCBank List JavaScript SDK Example

Gate REST get otcbank list JavaScript example for the Siebly Gate SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs.

**Path:** [Home](/) / [Examples](/examples) / [Gate](/examples/Gate) / [Rest](/examples/Gate/Rest) / [otc](/examples/Gate/Rest/otc) / [getOTCBankList.ts](/examples/Gate/Rest/otc/getOTCBankList)

[View source on GitHub](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Gate/Rest/otc/getOTCBankList.ts)

[Open the Gate JavaScript SDK guide](/sdk/gate/javascript)

## getOTCBankList.ts

```typescript
import { RestClient } from 'gateio-api';

const account = {
  key: process.env.API_KEY || 'yourApiHere',
  secret: process.env.API_SECRET || 'yourSecretHere',
};

const gateRestClient = new RestClient({
  apiKey: account.key,
  apiSecret: account.secret,
});

async function getOTCBankListExample() {
  try {
    console.log('Using API keys:', account);

    const result = await gateRestClient.getOTCBankList();

    console.log('Response: ', result);

    const defaultCard = result.data?.lists?.find((c) => c.is_default === 1);
    if (defaultCard) {
      console.log(
        'Default bank id for orders:',
        defaultCard.id ?? defaultCard.bank_id,
      );
    }
  } catch (e) {
    console.error('Error in execution: ', e);
  }
}

getOTCBankListExample();
```
