Skip to content

Commit

Permalink
Adds support for asset info (ViewBlock#412)
Browse files Browse the repository at this point in the history
* Add assetDetail endpoint

* assetDetail README
  • Loading branch information
ivancsicsmarkus authored May 13, 2021
1 parent 1001aa5 commit 9cbec87
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Following examples will use the `await` form, which requires some configuration
- [capitalConfigs](#capitalConfigs)
- [universalTransfer](#universalTransfer)
- [universalTransferHistory](#universalTransferHistory)
- [assetDetail](#assetDetail)
- [dustTransfer](#dustTransfer)
- [Margin](#margin)
- [marginRepay](#marginRepay)
Expand Down Expand Up @@ -1954,6 +1955,41 @@ console.log(await client.universalTransferHistory({ type: 'MAIN_C2C' }))

</details>

#### assetDetail

```js
console.log(await client.assetDetail())
```

| Param | Type | Required | Description |
| ---------- | -------- | -------- | ------------------- |
| recvWindow | Number | false |

<details>
<summary>Output</summary>

```js
{
"success": true,
"assetDetail": {
"CTR": {
"minWithdrawAmount": "70.00000000", //min withdraw amount
"depositStatus": false,//deposit status (false if ALL of networks' are false)
"withdrawFee": 35, // withdraw fee
"withdrawStatus": true, //withdraw status (false if ALL of networks' are false)
"depositTip": "Delisted, Deposit Suspended" //reason
},
"SKY": {
"minWithdrawAmount": "0.02000000",
"depositStatus": true,
"withdrawFee": 0.01,
"withdrawStatus": true
}
}
}
```

</details>

#### dustTransfer

Expand Down
1 change: 1 addition & 0 deletions src/http-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ export default opts => {
accountSnapshot: payload => privCall('/sapi/v1/accountSnapshot', payload),
universalTransfer: payload => privCall('/sapi/v1/asset/transfer', payload, 'POST'),
universalTransferHistory: payload => privCall('/sapi/v1/asset/transfer', payload),
assetDetail: payload => privCall('/sapi/v1/asset/assetDetail', payload),

dustTransfer: payload => privCall(' /sapi/v1/asset/dust', payload, 'POST'),

Expand Down

0 comments on commit 9cbec87

Please sign in to comment.