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

Method mgBorrow

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

* Margin account borrow/loan * @param {string} asset - the asset * @param {number} amount - the asset * @param {string} isIsolated - the isolated option * @param {string} symbol - symbol for isolated margin * @return {undefined}

(asset: string, amount: number, isIsolated = 'FALSE', symbol?: string, params: Dict = {})

Source from the content-addressed store, hash-verified

5585 * @return {undefined}
5586 */
5587 async mgBorrow(asset: string, amount: number, isIsolated = 'FALSE', symbol?: string, params: Dict = {}) {
5588 const parameters = Object.assign({ asset: asset, amount: amount });
5589 if (isIsolated === 'TRUE' && !symbol) throw new Error('If "isIsolated" = "TRUE", "symbol" must be sent');
5590 const isolatedObj = isIsolated === 'TRUE' ? {
5591 isIsolated,
5592 symbol
5593 } : {};
5594 return await this.privateSapiRequest('v1/margin/loan', this.extend({ ...parameters, ...isolatedObj }, params), 'POST');
5595 }
5596
5597 /**
5598 * Margin account borrow/loan

Callers

nothing calls this directly

Calls 1

privateSapiRequestMethod · 0.95

Tested by

no test coverage detected