在应该有另一个请求时,对请求得到相同的响应?

2024-03-29 08:53:30 发布

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

我对使用API非常陌生,我正在尝试找出如何获得对POST的响应

使用Ubuntu。我已经在ngrok上设置了一个回发服务器。我使用API来下订单。显示了ngrok终端上200的响应码。显示数据。 截图: enter image description here

我正试图获取这些数据,但当我:

requests.get('http://f3afa497.ngrok.io:80/').text

应用程序中的回发Url是:https:这可能是个问题吗

我总是收到同样的短信:

'{"placed_by":"TY5094","order_id":"190106000009064","exchange_order_id":"","parent_order_id":"","status":"REJECTED","status_message":"RMS:Blocked for EQUITY nse_cm NRML Remarks: Equity orders are not allowed in NRML product type block type: ALL","order_timestamp":"2019-01-06 18:37:21","exchange_update_timestamp":"","exchange_timestamp":"","variety":"regular","exchange":"NSE","tradingsymbol":"INFY","instrument_token":408065,"order_type":"MARKET","transaction_type":"BUY","validity":"DAY","product":"NRML","quantity":1,"disclosed_quantity":0,"price":0,"trigger_price":0,"average_price":0,"filled_quantity":0,"pending_quantity":0,"cancelled_quantity":0,"market_protection":0,"tag":""\n}'

这是从一个最新的请求方式之前的一个职位。查看订单号

我想知道我在这里做错了什么

谢谢


Tags: 数据apiidexchangetypestatusorderproduct