Ccxt: Binding request to specific network interface

Created on 7 Feb 2018  路  1Comment  路  Source: ccxt/ccxt

Maybe this an enhancement.

Is there a supported way to bind a ccxt request to a specific network interface?

Thank you

question

Most helpful comment

Is there a supported way to bind a ccxt request to a specific network interface?

Yes, sure!

  • JavaScript: you can pass a custom fetchImplementation with a custom agent class in constructor params to bind to a specific IP (see docs for Node.js http and node-fetch)
  • Python: you can use whatever session options are supported with python-requests and aiohttp, for that you can pass a custom session in constructor params
  • PHP: you can use the CURLOPT_INTERFACE to bind underlying cURL to an IP, for that you can override curlopt_interface in constructor params.

Let us know if this does not answer your question. Thx!

>All comments

Is there a supported way to bind a ccxt request to a specific network interface?

Yes, sure!

  • JavaScript: you can pass a custom fetchImplementation with a custom agent class in constructor params to bind to a specific IP (see docs for Node.js http and node-fetch)
  • Python: you can use whatever session options are supported with python-requests and aiohttp, for that you can pass a custom session in constructor params
  • PHP: you can use the CURLOPT_INTERFACE to bind underlying cURL to an IP, for that you can override curlopt_interface in constructor params.

Let us know if this does not answer your question. Thx!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slideup-benni picture slideup-benni  路  3Comments

jjhesk picture jjhesk  路  3Comments

jackyxie picture jackyxie  路  3Comments

jjhesk picture jjhesk  路  3Comments

nashse picture nashse  路  3Comments