Python 无法通过Coinbase Pro REST API下订单

Python 无法通过Coinbase Pro REST API下订单,python,python-3.x,rest,coinbase-api,Python,Python 3.x,Rest,Coinbase Api,我一直在尝试使用REST API()下购买订单,代码如下: api_url = 'https://api.pro.coinbase.com/' auth = CoinbaseExchangeAuth(API_KEY, API_SECRET, API_PASS) order_args = { "funds": "5", #Amount in GBP - quote currency "sid

我一直在尝试使用REST API()下购买订单,代码如下:


api_url = 'https://api.pro.coinbase.com/'
auth = CoinbaseExchangeAuth(API_KEY, API_SECRET, API_PASS)

order_args = {
             "funds": "5", #Amount in GBP - quote currency 
             "side": "buy",
             "product_id":"BCH-GBP", 
             "type":"market"
             }


requests.post(api_url + 'orders', auth=auth, data=order_args)


继续犯这个讨厌的错误

AttributeError: 'str' object has no attribute 'decode'
我对REST不是非常熟悉,但我仔细研究了一下,发现这可能是由于Python3的情况造成的。有人能指出我如何解决这个问题吗

在附加的图像中查找完整错误