为什么我的市场订单在使用Coinbase API时无法通过?我仍然在美元钱包里看到我的资金。对不起,我对这个API很陌生

2024-06-16 11:54:03 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的密码。我很抱歉,再次我是这个API的新手,我想知道我的资金仍然在美元钱包里,而他们应该在BTC钱包里

import cbpro
import numpy
import time

apiKey = "xxxxxxxxxxxxxx"
apiSecret = "xxxxxxxxxxxxxxxx"
passphrase = "xxxxxxx"

auth_client = cbpro.AuthenticatedClient(apiKey,apiSecret,passphrase)
currency = 'BTC-USD'
auth_client.place_market_order(product_id=currency, side='buy', funds='0.40')

Tags: importnumpyclientauthapi密码cbprocurrency
1条回答
网友
1楼 · 发布于 2024-06-16 11:54:03
import cbpro
import numpy
import time

apiKey = "xxxxxxxxxxxxxx"
apiSecret = "xxxxxxxxxxxxxxxx"
passphrase = "xxxxxxx"

auth_client = cbpro.AuthenticatedClient(apiKey,apiSecret,passphrase)
currency = 'BTC-USD'
auth_client.buy(price='100.00', #USD
               size='0.01', #BTC
               order_type='limit',
               product_id='BTC-USD')

这行吗

相关问题 更多 >