MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / apiRequest

Method apiRequest

src/node-binance-api.ts:669–679  ·  view source on GitHub ↗

* Create a http request to the public API * @param {string} url - The http endpoint * @param {object} data - The data to send * @param {function} callback - The callback method to call * @param {string} method - the http method * @return {undefined}

(url: string, data: Dict = {}, method: HttpMethod = 'GET')

Source from the content-addressed store, hash-verified

667 * @return {undefined}
668 */
669 async apiRequest(url: string, data: Dict = {}, method: HttpMethod = 'GET') {
670 this.requireApiKey('apiRequest');
671 const opt = this.reqObj(
672 url,
673 data,
674 method,
675 this.APIKEY
676 );
677 const res = await this.proxyRequest(opt);
678 return res;
679 }
680
681 requireApiKey(source = 'requireApiKey', fatalError = true) {
682 if (!this.APIKEY) {

Callers 3

userMarginDataMethod · 0.95
userFutureDataMethod · 0.95
userDeliveryDataMethod · 0.95

Calls 3

requireApiKeyMethod · 0.95
reqObjMethod · 0.95
proxyRequestMethod · 0.95

Tested by

no test coverage detected