Bitcoin Forum
December 15, 2024, 07:27:24 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: MTGox v2 api error " login_error_invalid_rest_sign" How to write sign?  (Read 431 times)
finbit (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
April 29, 2013, 07:41:53 AM
 #1

Hi

When i trying send order via api i have problem(another  private api works fine like get orders ,get info

"result":"error","error":"Identification required to access private API","token":"login_error_invalid_rest_sign

What i should change?
Code:
 IMtGoxExchange mtGoxExchange = new MtGoxExchange();
                OrderCreateResponse response1 = mtGoxExchange.CreateOrder(Currency.USD, OrderType.Ask, 150.0, 10.0);
                OrderCancelResponse cancelResponse1 = mtGoxExchange.CancelOrder(response1.OID);

inner source code for request (from debug window)
prefix=BTCUSD/money/order/add
post=nonce=635028379133977468&type=ask&amount_int=15000000000&price_int=1000000

string sign = getHash(Convert.FromBase64String(APISecret), prefix + Convert.ToChar(0) + post);

 req.AddHeader("Rest-Key", APIKey);
            req.AddHeader("Rest-Sign", sign);
            req.AddParameter("nonce", nonce);
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!