Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send order with proxy #79

Open
progmlp opened this issue Jul 30, 2022 · 6 comments
Open

send order with proxy #79

progmlp opened this issue Jul 30, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@progmlp
Copy link

progmlp commented Jul 30, 2022

How to send a limit order request with a proxy in this module?

@codewc
Copy link
Contributor

codewc commented Aug 1, 2022

How to send a limit order request with a proxy in this module?

Hi, it is the requests library used by SDK, you can modify the source code to add proxis parameter to support.

@codewc codewc added the enhancement New feature or request label Aug 1, 2022
@progmlp
Copy link
Author

progmlp commented Aug 1, 2022 via email

@progressivehed
Copy link

Hello

  1. First import the requests package.

  2. Create a proxies dictionary that defines the HTTP and HTTPS connections. This variable should be a dictionary that maps a protocol to the proxy URL. Additionally, make a URL variable set to the webpage you're scraping from. You may use the same syntax for different API calls, but regardless of the call you're making, you need to specify the protocol.

Example:

> 
> import requests
> 
> proxies = {
>    'http': 'http://proxy.example.com:8080',
>    'https': 'http://secureproxy.example.com:8090',
> }
> 
> url = 'http://mywebsite.com/example'
> 
> response = requests.post(url, proxies=proxies)

Requests Methods ✍️
response = requests.get(url)
response = requests.post(url, data={"a": 1, "b": 2})
response = requests.put(url, data=put_body)
response = requests.delete(url)
response = requests.patch(url, data=patch_update)
response = requests.head(url)
response = requests.options(url)

Proxy Authentication 👩‍💻
If you need to add authentication, you can rewrite your code using the following syntax:

response = requests.get(url, auth=('user', 'pass'))

@progressivehed
Copy link

Please message me in API telegram group if you needed more help

@progmlp
Copy link
Author

progmlp commented Aug 3, 2022 via email

@progressivehed
Copy link

You can simply find all the source codes here:

https://github.com/Kucoin/kucoin-python-sdk/tree/master/kucoin

Just edit them based on your needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants