MtGox Gem Failing to Login

0 votes

I am trying to use the MtGox gem to cancel orders. 

I am using the following code to make the call:

MtGox.configure {|c| c.key = user.mtgox_key; c.secret = user.mtgox_secret}
MtGox.cancel('oid'=>'a3c348d9-36c3-4927-b84d-206f421907f5', 'type'=>1)

I have also tried getting all of the open orders for a specific user using the following:

MtGox.post('/api/0/getOrders.php', {})

I only get the following error message:

{"error":"Must be logged in"}
Aug 31, 2018 in Blockchain by digger
• 26,740 points
368 views

1 answer to this question.

0 votes

Try using a smaller nonce for v1 api calls. Interestingly, a nonce of length 22 sometimes causes subsequent v0 api calls to fail, but not subsequent v1 calls. I compute my nonce by simply using:

var nonce = ((new Date()).getTime()*1000).toString(); // microseconds since epoch
answered Aug 31, 2018 by slayer
• 29,350 points

Related Questions In Blockchain

+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Basically you implement requested logic on by ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
1,218 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 1,354 views
+4 votes
2 answers

I am unable to connect Ganache with Truffle/Npm Dev server. Pls help.

The issue is at CurrentProvider. Give the url ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 17,100 points

edited Oct 11, 2018 by Omkar 2,193 views
+1 vote
1 answer

How to deploy ethereum smart contracts on a website?

There are many ways to do this: 1 ...READ MORE

answered Mar 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,642 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,129 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,663 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
0 votes
1 answer

Updating data of struct to save in chaincode.

You can use a code similar to ...READ MORE

answered Jul 5, 2018 in Blockchain by slayer
• 29,350 points
1,027 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP