-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from btschwertfeger/3-add-kraken-staking-endpoints
added private staking endpoints
- Loading branch information
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from kraken.base_request.base_request import KrakenBaseRestAPI | ||
|
||
|
||
class StakingData(KrakenBaseRestAPI): | ||
|
||
def stake_asset(self, asset: str, amount: str, method: str) -> dict: | ||
'''https://docs.kraken.com/rest/#operation/stake''' | ||
params = { | ||
'asset': asset, | ||
'amount': str(amount), | ||
'method': method | ||
} | ||
return self._request('POST', '/private/Stake', params=params) | ||
|
||
def unstake_asset(self, asset: str, amount: str) -> dict: | ||
'''https://docs.kraken.com/rest/#operation/unstake''' | ||
params = { | ||
'asset': asset, | ||
'amount': str(amount) | ||
} | ||
return self._request('POST', '/private/Unstake', params=params) | ||
|
||
def list_stakeable_assets(self) -> dict: | ||
'''https://docs.kraken.com/rest/#operation/getStakingAssetInfo''' | ||
return self._request('POST', '/private/Staking/Assets') | ||
|
||
def get_pending_staking_transactions(self) -> dict: | ||
'''https://docs.kraken.com/rest/#operation/getStakingPendingDeposits''' | ||
return self._request('POST', '/private/Staking/Pending') | ||
|
||
def list_staking_transactions(self) -> dict: | ||
'''https://docs.kraken.com/rest/#operation/getStakingTransactions''' | ||
return self._request('POST', '/private/Transactions') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters