Gate REST create otcbank 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.
gateio-api instead of hand-written HTTP request plumbing.Gate/Rest/otc/createOTCBank.ts.RestClient.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(); We use essential cookies and optional analytics. Read the Privacy Policy.
Essential cookies stay on. Toggle analytics if you want to share anonymous usage insights. You can revisit this anytime via Cookie Settings in the footer.