binance-api-node
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -24,3 +24,3 @@ 'use strict'; | ||
var BASE = 'https://www.binance.com'; | ||
var BASE = 'https://api.binance.com'; | ||
@@ -254,12 +254,12 @@ /** | ||
withdraw: function withdraw(payload) { | ||
return pCall('/wapi/v1/withdraw.html', payload, 'POST'); | ||
return pCall('/wapi/v3/withdraw.html', payload, 'POST'); | ||
}, | ||
withdrawHistory: function withdrawHistory(payload) { | ||
return pCall('/wapi/v1/getWithdrawHistory.html', payload, 'POST'); | ||
return pCall('/wapi/v3/withdrawHistory.html', payload); | ||
}, | ||
depositHistory: function depositHistory(payload) { | ||
return pCall('/wapi/v1/getDepositHistory.html', payload, 'POST'); | ||
return pCall('/wapi/v3/depositHistory.html', payload); | ||
}, | ||
depositAddress: function depositAddress(payload) { | ||
return pCall('/wapi/v1/getChargeAddress.html', payload, 'POST'); | ||
return pCall('/wapi/v3/depositAddress.html', payload); | ||
}, | ||
@@ -266,0 +266,0 @@ |
{ | ||
"name": "binance-api-node", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -644,13 +644,26 @@ # binance-api-node [![Build](https://img.shields.io/travis/HyperCubeProject/binance-api-node.svg?style=flat-square)](https://travis-ci.org/HyperCubeProject/binance-api-node) [![Coverage](https://img.shields.io/coveralls/HyperCubeProject/binance-api-node.svg?style=flat-square)](https://coveralls.io/github/HyperCubeProject/binance-api-node) [![bnb](https://img.shields.io/badge/binance-winner-yellow.svg?style=flat-square)](https://github.com/binance-exchange/binance-api-node) | ||
**Method not ready yet** | ||
Retrieve the account deposit address for a specific asset. | ||
Retrieve the account deposit address for a specific coin. | ||
```js | ||
console.log(await client.depositAddress({ asset: 'NEO' })) | ||
``` | ||
|Param|Type|Required|Description| | ||
|--- |--- |--- |--- | | ||
|asset|String|true|The asset name| | ||
<details> | ||
<summary>Output</summary> | ||
```js | ||
console.log(await client.depositAddress({ | ||
coin: 'NEO', | ||
sameAddress: false, | ||
})) | ||
{ | ||
address: 'AM6ytPW78KYxQCmU2pHYGcee7GypZ7Yhhc', | ||
addressTag: '', | ||
asset: 'NEO', | ||
success: true, | ||
} | ||
``` | ||
</details> | ||
### WebSockets | ||
@@ -657,0 +670,0 @@ |
@@ -6,3 +6,3 @@ import crypto from 'crypto' | ||
const BASE = 'https://www.binance.com' | ||
const BASE = 'https://api.binance.com' | ||
@@ -202,6 +202,6 @@ /** | ||
withdraw: payload => pCall('/wapi/v1/withdraw.html', payload, 'POST'), | ||
withdrawHistory: payload => pCall('/wapi/v1/getWithdrawHistory.html', payload, 'POST'), | ||
depositHistory: payload => pCall('/wapi/v1/getDepositHistory.html', payload, 'POST'), | ||
depositAddress: payload => pCall('/wapi/v1/getChargeAddress.html', payload, 'POST'), | ||
withdraw: payload => pCall('/wapi/v3/withdraw.html', payload, 'POST'), | ||
withdrawHistory: payload => pCall('/wapi/v3/withdrawHistory.html', payload), | ||
depositHistory: payload => pCall('/wapi/v3/depositHistory.html', payload), | ||
depositAddress: payload => pCall('/wapi/v3/depositAddress.html', payload), | ||
@@ -208,0 +208,0 @@ getDataStream: () => pCall('/v1/userDataStream', null, 'POST', true), |
@@ -99,15 +99,12 @@ import test from 'ava' | ||
t.true(history.success) | ||
t.truthy(history.withdrawList.length) | ||
t.is(typeof history.withdrawList.length, 'number') | ||
}) | ||
// test.only('[REST] depositAddress', async t => { | ||
// const out = await client.depositAddress({ | ||
// coin: 'NEO', | ||
// sameAddress: false, | ||
// }) | ||
test.serial('[REST] depositAddress', async t => { | ||
const out = await client.depositAddress({ asset: 'NEO' }) | ||
t.true(out.success) | ||
t.is(out.asset, 'NEO') | ||
t.truthy(out.address) | ||
}) | ||
// console.log(out) | ||
// t.true(out) | ||
// }) | ||
test.serial('[REST] myTrades', async t => { | ||
@@ -114,0 +111,0 @@ const trades = await client.myTrades({ symbol: 'ENGETH' }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205303
796
1163