You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proxying is handled via axios (which is used for all HTTP request building in my SDKs). There's a few ways to configure proxies, and the correct way depends on the proxy you're trying to use. Ideally the provider of your proxy can explain how to use it / what kind of proxy it is. Typically this method will work for most HTTP/HTTPS proxies: https://github.com/tiagosiebler/bybit-api/blob/master/examples/rest-v5-proxies.ts#L20-L32
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5(
{
testnet: true,
key: key,
secret: secret,
},
{
proxy: {
host: host,
port: port,
auth: {
username: username,
password: password,
},
},
},
);
client.submitOrder({
category: 'spot',
symbol: 'ETHUSDT',
side: 'Buy',
orderType: 'Market',
qty: '0.1',
})
.then((response) => {
console.log(JSON.stringify(response, null, 2));
})
.catch((error) => {
console.error(error);
});
i got error "Error: Client network socket disconnected before secure TLS connection was established" when i make a api call
"headers: Object [AxiosHeaders] {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'X-BAPI-SIGN-TYPE': '2',
'X-BAPI-API-KEY': 'vTxZJiHCNDBCBIzaYe',
'X-BAPI-TIMESTAMP': '1715069550287',
'X-BAPI-SIGN': 'a52550de4c44fcdfb30d251a769973d515e4acc0c4618ea38f6713e69dd46a52',
'X-BAPI-RECV-WINDOW': '5000',
'x-referer': 'bybitapinode',
'User-Agent': 'axios/1.6.8',
'Content-Length': '84',
'Accept-Encoding': 'gzip, compress, deflate, br'
},"
The text was updated successfully, but these errors were encountered: