Skip to content

Commit

Permalink
Merge pull request #29 from dazDeng/master
Browse files Browse the repository at this point in the history
add margin price strategy api
  • Loading branch information
1bazinga25 authored Feb 25, 2022
2 parents 5a4c3e1 + 6627a12 commit 8a79c5d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Signature is not required for this part
- [x] getMarginConfigurationInfo
- [x] getMarginAccount
- [x] postMarginOrder
- [x] getMarginPriceStrategy
#### Rest/Margin/BorrowAndLend
- [x] postBorrowOrder
- [x] getBorrowOrder
Expand Down
24 changes: 24 additions & 0 deletions src/rest/Margin/MarginInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,27 @@ exports.postMarginOrder = async function postMarginOrder(params = {}) {
*/
return await Http().POST('/api/v1/margin/order', { ...params });
};

/**
* @description Request via this endpoint to get the cross/isolated margin risk limit.
* @param {string} marginModel - marginModel
* @returns {Object} { code, success, data }
*/
exports.getMarginPriceStrategy = async function getMarginPriceStrategy({ marginModel } = {}) {
/*
{
"code": "200000",
"data": {
[
{
"currency": "BTC",
"borrowMaxAmount": "50",
"buyMaxAmount": "50",
"precision": 8
}
]
}
}
*/
return await Http().GET('/api/v1/risk/limit/strategy', {marginModel});
};

0 comments on commit 8a79c5d

Please sign in to comment.