仕事が完了した

実行時間5 時間
依頼者からのフィードバック
Good and fast programmer, quickly responds to messages, stays on point.
開発者からのフィードバック
Great customer, very friendly and kindly.

指定

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.

応答済み

1
開発者 1
評価
(5)
プロジェクト
5
20%
仲裁
2
0% / 100%
期限切れ
1
20%
2
開発者 2
評価
(69)
プロジェクト
93
34%
仲裁
10
40% / 30%
期限切れ
5
5%
類似した注文
Looking for an experienced MQL5 developer to design and develop a custom Expert Advisor (EA) for MetaTrader 5. The purpose of this EA is not just automated trading, but also to help me better structure, test, and refine my personal trading strategy
I’m hiring an experienced MQL5 developer to finish and fix an existing project (NOT building from scratch). I have: An existing MT5 EA (.mq5 + .ex5) that is based on my TradingView logic A TradingView indicator version used for signals/alerts The EA works but has logic/consistency issues and needs improvements + cleanup Goal Make the EA reliable and consistent: Ensure entries/exits match the intended logic Fix
Data Integrity 500 - 1000 USD
The trading bot is an automated software system designed to monitor financial markets, execute trades, and manage risk based on predefined strategies. The bot aims to maximize profits while minimizing human intervention and emotional decision-making. Scope: Supports automated trading on selected exchanges (e.g., Binance, Bitget, Coinbase). Executes trades based on technical indicators, signals, or AI models. Provides
I need a AI signal generating bot for forex trading that use the latest ai technology to track real time forex market, analyse and give signals. The bot should operate such that when i put it in a chart it will analyse the market, after several minutes it will display whether the trade is buying or selling. It should display the one minute, five minute,15minute, 30 minute, one hour, 4 hours and daily time frame

プロジェクト情報

予算
30 - 60 USD
締め切り
最低 1 最高 2 日