---
title: "Gate REST Create OTCBank JavaScript SDK Example | Siebly"
description: "Gate REST create otcbank 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/createOTCBank"
robots: "index,follow"
---

# Gate REST Create OTCBank JavaScript SDK Example

Gate REST create otcbank 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) / [createOTCBank.ts](/examples/Gate/Rest/otc/createOTCBank)

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

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

## createOTCBank.ts

```typescript
import { readFileSync } from 'fs';
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 createOTCBankExample() {
  try {
    console.log('Using API keys:', account);

    // Path to account-opening proof (jpg/jpeg/png/pdf, max 4MB per Gate docs)
    const proofPath =
      process.env.OTC_PROOF_FILE || './account-opening-proof.pdf';
    const documentation_file = readFileSync(proofPath);

    const result = await gateRestClient.createOTCBank({
      bank_account_name: 'Account Holder Name',
      bank_name: 'Example Bank',
      bank_country: 'US',
      bank_address: '123 Example Street',
      iban: 'DE89370400440532013000',
      swift: 'COBADEFFXXX',
      remittance_line_number: '',
      agent_bank_name: '',
      agent_bank_swift: '',
      documentation_file: {
        filename: 'account-opening-proof.pdf',
        content: documentation_file,
      },
    });

    console.log('Response: ', result);
  } catch (e) {
    console.error('Error in execution: ', e);
  }
}

createOTCBankExample();
```
