UNPKG

@cryptodevops/n8n-nodes-binance

Version:
54 lines (53 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Binance = void 0; class Binance { constructor() { this.name = 'binance'; this.displayName = 'Binance'; this.documentationUrl = 'https://binance-docs.github.io/apidocs/spot/en/'; this.properties = [ { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true }, default: '', required: true, description: 'Your Binance API Key', }, { displayName: 'API Secret', name: 'apiSecret', type: 'string', typeOptions: { password: true }, default: '', required: true, description: 'Your Binance API Secret', }, { displayName: 'Testnet', name: 'testnet', type: 'boolean', default: false, description: 'Whether to use Binance Testnet', }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'X-MBX-APIKEY': '={{$credentials.apiKey}}', }, }, }; this.test = { request: { baseURL: '={{$credentials.testnet ? "https://testnet.binance.vision" : "https://api.binance.com"}}', url: '/api/v3/ping', method: 'GET', }, }; } } exports.Binance = Binance;