Bittrex API #400 "Bad Request" WebRequest problem

Lavoro terminato

Tempo di esecuzione 5 ore
Feedback del cliente
Good and fast programmer, quickly responds to messages, stays on point.
Feedback del dipendente
Great customer, very friendly and kindly.

Specifiche

I have been using bittrex bot for over a year and few days ago it started to report BAD REQUEST (400) error. (my code did not change, something changed in Bittrex)

this is my mql code:

int nonce = TimeGMT();
string uri = "https://bittrex.com/api/v1.1/market/getopenorders?apikey="+api_key+"&nonce="+nonce; 
StringToCharArray(uri, uri_char, 0, WHOLE_ARRAY, CP_UTF8); 
string output = CryptCreateSHA512Hash(uri,api_secret); 
ArrayResize(uri_char, ArraySize(uri_char)-1);
string headers = "apisign:"+output; 
int res=WebRequest("POST",uri, headers,private_api_timeout,uri_char, result_char, result_headers);
result = CharArrayToString(result_char,0,WHOLE_ARRAY);
if(res!=200)
{
   Print2("Authorization error #"+(string)res+", LastError="+(string)GetLastError());
   Print2("result = "+result);
   Print2("ERROR: Positions NOT LOADED from all pairs!");
} else {
...
}

reports:

Authorization error #400, LastError=0
result2 = Bad Request

php example, that works:

<?php

$apikey='xxx';
$apisecret='xxx'; 
$nonce=time(); 
$uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&nonce='.$nonce; 
$sign=hash_hmac('sha512',$uri,$apisecret); 
$ch = curl_init($uri); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign)); 
$execResult = curl_exec($ch); 
$obj = json_decode($execResult);

if (curl_error($ch)) {
    $error_msg = curl_error($ch);
    echo 'error='.$error_msg;
} else {
    echo 'execResult='.$execResult;
}

?>

returns:

{"success":true,"message":"","result":[]}execResult=1


When I wrote their customer support, they replied:

Hi,

The the V1.1 API has been changed to no longer accept request bodies. You must use the API as documented with a query string.

https://support.bittrex.com/hc/en-us/articles/115003723911-Developer-s-Guide-API

Best Regards,

But I still can't catch what am I doing wrong in my code. Another response from service desk, after me implying that their method doesn't work for me:

HI,

Our developers are working to resolve this issue. Please see the information below. 

There is a workaround to use GetOrdersEx which does not require a POST.

## API POST Account/GetOrders

* Method : POST
* URL : https://bittrex.com/api/v1.1/Account/GetOrders?apikey=xxx&nonce=1234
* HEADER :
  * apisign : signature with hmac(sah512) fro above URL
* BODY format :
  * {"orders":["xxxxxxxx-2f68-405b-bfd3-fb19b362feea","xxxxxxxx-3583-48e5-951f-29b3ed04b65f"]}
* LIMIT : orders count <= 1000

I need someone to make my code great again and make it work with Bittrex API, as it used to.

Con risposta

1
Sviluppatore 1
Valutazioni
(5)
Progetti
5
20%
Arbitraggio
2
0% / 100%
In ritardo
1
20%
Gratuito
2
Sviluppatore 2
Valutazioni
(69)
Progetti
93
34%
Arbitraggio
10
40% / 30%
In ritardo
5
5%
Gratuito
Ordini simili
Early Killer EA 30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea
I want to use a ai subscription service called Clarifai as an image identification tool, and I wish to use it in response to screenshots of my signals being generated and placed in a folder. -I believe there needs to be a script that responds to a new screenshot being added to a specific folder That script then sends the image to Clarifai, and then Clarifai needs to be instructed to scan that image and look for
The basic idea of CRO is to simulate coral colonies that develop and compete for space on a reef, ultimately forming an optimal structure. Each coral in the reef represents a potential solution to the optimization problem under consideration. The reef is modeled as a two-dimensional N×M grid. Each grid cell can either be occupied by a coral or left empty. A coral is a coded solution to an optimization problem. For
Ninjatrdaer Script 500 - 1000 USD
I am looking to purchase a ninjatrader script, if there is any for sale, i mean a ready made ninjatrdaer script that trade futures, i need the seller to show me a backtest of the system, you know send some results, I would like to see a 1 year and YTD backtest
I will like to purchase tradingview strategy with high winning rate, i mean already made, tested and trusted and powerful strategy, i have tried to code my own strategy with lot of freelancers but nothing to me i am just wasting money, i have wasted lot of money already, so i need a high winning rate tradingview strategy, we can discuss price in chat, I will need to see some test result as well
Mk 30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot
Apply with a screen of your work . Symbol Specific Logic . Live Chart Optimization Check the Core logic . [back tests as well] Change points to pips . Create buffer for the zone
Fair Value Gap Expert , Optimize the core logic for live chart . [Filters are working] Lets ace the trailing stop . Change points to pip . Project will start from next week

Informazioni sul progetto

Budget
30 - 60 USD
Scadenze
da 1 a 2 giorno(i)