Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Transfer added #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,27 @@ def transfer_from_subaccount(
body,
idempotency_key,
)

def create_internal_transfer(
self, exchange_account_id, source_type, dest_type, asset, amount, idempotency_key=None
):
"""Create an internal transfer between two trading accounts in an exchange account.

Args:
exchange_account_id (string): The exchange ID in Fireblocks
source_type (string): The source trading account type
dest_type (string): The destination trading account type
asset (string): The asset to transfer
amount (double): The amount to transfer
idempotency_key (str, optional)
"""
body = {"sourceType": source_type, "destType": dest_type, "asset": asset, "amount": amount}

return self._post_request(
f"/v1/exchange_accounts/{exchange_account_id}/internal_transfer",
body,
idempotency_key,
)

def get_fiat_accounts(self):
"""Gets all fiat accounts for your tenant"""
Expand Down
Loading