lilcha
lilcha

Reputation: 39

Binance API: how to get the USD as the quote asset

I'm wondering what the symbol is or if I am even able to get historical price data on BTC, ETH, etc. denominated in United States Dollars.

right now when if I'm making a call to client such as: Client.get_symbol_info('BTCUSD') it returns nothing

Does anyone have any idea how to get this info? Thanks!

Upvotes: 2

Views: 5340

Answers (2)

killer_willer
killer_willer

Reputation: 1

this work for me

        df =  pd.DataFrame(cliente.get_account()["balances"]) #CHEKEO MI SALDO
        df["free"] = df["free"].astype(float).round(4)
        saldoCrypto = df.query('asset == @baseAsset')[['free']]
        saldoCrypto = saldoCrypto["free"].values[0]

        saldoUSDT = df.query('asset == @quoteAsset')[['free']]
        saldoUSDT = saldoUSDT["free"].values[0]
        return  float(saldoCrypto),float(saldoUSDT)

Upvotes: 0

Ricardo
Ricardo

Reputation: 1356

You can not make trades in Binance with dollars but instead with Tether(USDT) that is a cryptocurrency that is backed 1-to-1 with dollar.

To solve that use BTCUSDT Change BTCUSD to BTCUSDT

Upvotes: 3

Related Questions