Skip to content
Advertisement

Tag: rest

What does “size” parameter in Kucoin futures API refer to?

Kucoin Futures API documentation for placing a limit order ( https://docs.kucoin.com/futures/#place-an-order ) has a param called “size” with type Integer. The description is given as “Order size. Must be a positive number”. A limit order to buy “CELRUSDTM” with param size = 1 results in an order placed to buy 10 CELR. A limit order to buy “ETHUSDTM” with param

PEM Certificate & TLS Verification against REST api

I have been provided with a pem certificate to authenticate with a third party. Authenticating using certificates is a new concept for me. Inside are two certificates and a private key. The issuer has advised they do not support SSL verification but use TLS(1.1/1.2). I have run a script as below: I’m getting the following error: SSLError: HTTPSConnectionPool(host=’url.com, port=443): Max

How to validate request body in FastAPI?

I understand that if the incoming request body misses certain required keys, FastAPI will automatically raise 422 unserviceable entity error. However, is there a way to check the incoming request body by myself in the code and raise a 400 bad request if if misses required names? For example, say I have this model and schema: The POST endpoint to

REST API: How to prevent “An existing connection was forcibly closed by the remote host”

Following this thread, https://stackoverflow.com/a/2582070/6534818, I am wondering if there is any room for improvement to my REST API query that would limit the frequency to which I receive the following error: “An existing connection was forcibly closed by the remote host”. The thread suggests, as one possibility, that the query is malformed. My general setup for a query to Azure

Python3 delete n amount of elements in list after every loop

I can request the stock of 250 products at once. There are around about 7500-8000 products, but the amount changes by the day. So I try to request 250 products, delete them and do this again until my list(all_sku) holds less than 250 items in it, so I know this is my last request. Sounds pretty easy, but today e.g

Advertisement