Can I Change My IP Location to Access Binance API?

This topic was automatically generated from Slack. You can find the original thread here.

Can we have the option to change our IP location? I’m trying to use http to send requests to binance API, but the servers are located in restricted area, so I can’t call them

Hi , Pipedream supports HTTP Proxy that allow you to request through another host.

This is currently supported out-of-the box for Team or Enterprise plan. You can refer to Pipedream HTTP proxy doc for more detail

If you have an existing HTTP Proxy, you can follow the example there to set it up

Ah okay, so no option on free plans

, actually for Free plan, you can buy a HTTP Proxy from a HTTP Proxy provider, and having your code step to use it instead. Here’s the code example:

import axios from "axios";
import httpsProxyAgent from "https-proxy-agent";

export default defineComponent({
  async run({ steps, $ }) {
    const agent = new httpsProxyAgent(`http://${user}:${pass}@${host}:${port}`);

    const config = {
      method: "GET",
      url: "https://example.com",
      httpsAgent: agent,
    };

    return await axios.request(config);
  }
});

Damn, was hoping there was some free way to do this :sweat_smile: