@@ -1581,6 +1581,49 @@ binance.withdraw("BTC", "1C5gqLRs96Xq4V2ZZAR1347yUCpHie7sa", 0.2);
15811581let name = ' My Withdrawal Address'
15821582binance .withdraw (" BTC" , " 1C5gqLRs96Xq4V2ZZAR1347yUCpHie7sa" , 0.2 , undefined , name)
15831583```
1584+ # Margin
1585+ Margin is newly implemented and a work in progress.
1586+ For now:
1587+ #### Transfer from Main account to Margin account
1588+ ``` js
1589+ binance .mgTransferMainToMargin (asset, amount, (error , response ) => {
1590+ if (error) {
1591+ // error from Binance endpoint
1592+ } else {
1593+ // should get a tranId
1594+ }
1595+ });
1596+ ```
1597+ #### Transfer from Margin account to Main account
1598+ ``` js
1599+ binance .transferMarginToMain (asset, amount, (error , response ) => {
1600+ if (error) {
1601+ // error from Binance endpoint
1602+ } else {
1603+ // should get a tranId
1604+ }
1605+ });
1606+ ```
1607+ #### Borrow from margin account
1608+ ``` js
1609+ binance .mgBorrow (asset, amount, (error , response ) => {
1610+ if (error) {
1611+ // error from Binance endpoint
1612+ } else {
1613+ // should get a tranId
1614+ }
1615+ });
1616+ ```
1617+ #### Repay margin account
1618+ ``` js
1619+ binance .mgRepay (asset, amount, (error , response ) => {
1620+ if (error) {
1621+ // error from Binance endpoint
1622+ } else {
1623+ // should get a tranId
1624+ }
1625+ });
1626+ ```
15841627
15851628#### [ Advanced Examples] ( https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md )
15861629> [ exchangeInfo: Pull minimum order size, quantity, etc] ( https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#exchangeinfo-pull-minimum-order-size-quantity-etc ) \
0 commit comments