MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_balance

Method fetch_balance

python/ccxt/delta.py:1650–1682  ·  view source on GitHub ↗

query for balance and get the amount of funds available for trading or funds locked in orders https://docs.delta.exchange/#get-wallet-balances :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict: a `balance structure <https://

(self, params={})

Source from the content-addressed store, hash-verified

1648 return self.safe_balance(result)
1649
1650 def fetch_balance(self, params={}) -> Balances:
1651 """
1652 query for balance and get the amount of funds available for trading or funds locked in orders
1653
1654 https://docs.delta.exchange/#get-wallet-balances
1655
1656 :param dict [params]: extra parameters specific to the exchange API endpoint
1657 :returns dict: a `balance structure <https://docs.ccxt.com/?id=balance-structure>`
1658 """
1659 self.load_markets()
1660 response = self.privateGetWalletBalances(params)
1661 #
1662 # {
1663 # "result":[
1664 # {
1665 # "asset_id":1,
1666 # "available_balance":"0",
1667 # "balance":"0",
1668 # "commission":"0",
1669 # "id":154883,
1670 # "interest_credit":"0",
1671 # "order_margin":"0",
1672 # "pending_referral_bonus":"0",
1673 # "pending_trading_fee_credit":"0",
1674 # "position_margin":"0",
1675 # "trading_fee_credit":"0",
1676 # "user_id":22142
1677 # },
1678 # ],
1679 # "success":true
1680 # }
1681 #
1682 return self.parse_balance(response)
1683
1684 def fetch_position(self, symbol: str, params={}):
1685 """

Callers

nothing calls this directly

Calls 3

load_marketsMethod · 0.95
parse_balanceMethod · 0.95

Tested by

no test coverage detected