Gate REST JavaScript SDK example: submitOTCBankPersonalSupplement.ts

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

We use environment variables in our examples for API keys. It is your responsibility to manage and secure your keys appropriately.

examples/Gate/Rest/otc/submitOTCBankPersonalSupplement.ts

What this example covers

  • Gate REST API JavaScript example.
  • Uses the Siebly Gate SDK package gateio-api instead of hand-written HTTP request plumbing.
  • Source path: Gate/Rest/otc/submitOTCBankPersonalSupplement.ts.
  • Example category: REST.
  • Imports SDK symbols including RestClient.

How to use this example

  • Start here for the specific request or stream pattern, then check the matching SDK guide for install, credentials, and operational notes.
  • Open the repository source when you need the latest committed version: GitHub source file.
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 submitOTCBankPersonalSupplementExample() {  try {    console.log('Using API keys:', account);     const bank_id =      process.env.OTC_BANK_ID || 'your_bank_id_from_getOTCBankList';     const result = await gateRestClient.submitOTCBankPersonalSupplement({      bank_id,      id_document_front: {        filename: 'id_front.jpg',        content: readFileSync(          process.env.OTC_ID_FRONT_FILE || './id_front.jpg',        ),      },      id_document_back: {        filename: 'id_back.jpg',        content: readFileSync(process.env.OTC_ID_BACK_FILE || './id_back.jpg'),      },      address_proof: {        filename: 'address_proof.pdf',        content: readFileSync(          process.env.OTC_ADDRESS_PROOF_FILE || './address_proof.pdf',        ),      },    });     console.log('Response: ', result);  } catch (e) {    console.error('Error in execution: ', e);  }} submitOTCBankPersonalSupplementExample(); 

Subscribe on Substack

Complete the Substack form below to join our newsletter. Substack handles all subscriber data directly.