solomon (OP)
|
|
March 03, 2013, 01:35:02 AM |
|
Hi i am trying to learn how to use the mtgox api but am struggling with some things. I have managed to make some basic api calls, but am unsure how to pass parameters when it is necessary. for example to submit an order the wiki says: ### Submit an order https://mtgox.com/api/1/BTCUSD/private/order/addparameters: type (bid|ask) (easier to remember: bid == buy, ask == sell) amount_int <amount as int> price_int <price as int> (can be omitted to place market order) submits an order and returns the OID and info about success or error ### I tried: https://mtgox.com/api/1/BTCUSD/private/order/add?type=ask?amount_int=100000000?price_int=2500000But im just getting error: "Invalid parameter "type" (should be ask or bid)" (Also in INT is 100000000 = 1BTC?)
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
solomon (OP)
|
|
March 03, 2013, 11:24:10 AM |
|
OK thanks. I figured i'd have some of the syntax wrong. It's frustrating that there's so little information available, and the wiki gives details but no examples of how to pass multiple variables. I can learn but i need examples! I'm still getting the error, maybe i will post to dev forum, i thought it was too basic tbh.
|
|
|
|
boristheblade
Newbie
Offline
Activity: 2
Merit: 0
|
|
March 03, 2013, 11:34:39 AM |
|
that's, funny. I'm having the exact same problem right now. let me know if you get anywhere with it.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
|
March 03, 2013, 11:38:29 AM |
|
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
solomon (OP)
|
|
March 03, 2013, 12:31:38 PM |
|
OK i figured out how to do it, someone should update the wiki that's, funny. I'm having the exact same problem right now. let me know if you get anywhere with it.
I'm using php so a market order for .v1 would be the same as the example shown here ( https://en.bitcoin.it/wiki/MtGox/API/HTTP) except instead of: var_dump(mtgox_query('0/buyBTC.php', array('amount' => 1, 'price' => 15))); it would be something like var_dump(mtgox_query('1/BTCUSD/private/order/add', array('type' => 'bid', 'amount_int' => 100000000, "price_int" => 1500000) ) );
|
|
|
|
boristheblade
Newbie
Offline
Activity: 2
Merit: 0
|
|
March 03, 2013, 07:43:34 PM |
|
I'm using java. What does the actual final url look like?
|
|
|
|
bitmango
Newbie
Offline
Activity: 29
Merit: 0
|
|
March 27, 2013, 11:39:05 AM |
|
Hi, I'm trying to extract the amount of cash I have in my wallet and put it into a variable. I'm using : var_export(mtgox_query('1/generic/private/info'), true);
Which captures information, but I can't for the life of me work out how to separate the resulting arrays into variables. Can anyone help? i.e. I want: array ( 'result' => 'success', 'return' => array ( 'USD' => array ( 'Balance' => array ( 'value' => '0.00', ),
to become: $wallet_cash_balance = 'Balance' Can anyone educate me??? The main problem that i'm having is that there are multiple arrays embedded, and so I can't find any useful php code examples online.
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
|
March 27, 2013, 04:49:29 PM |
|
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
kiolo
Newbie
Offline
Activity: 2
Merit: 0
|
|
March 28, 2013, 07:13:35 AM |
|
|
|
|
|
bombartier357
|
|
March 28, 2013, 09:38:15 PM |
|
Shoot me a PM and I will send you some of my code that I use. I am at work right now and therefore do not have access to my code.
I currently have 14 bots running that trade bitcoin based on different parameters. So I do have quite a bit of experience with this.
I would be happy to walk you through it.
|
|
|
|
happygeorge
Full Member
Offline
Activity: 146
Merit: 100
In da Jungle!
|
|
March 30, 2013, 05:21:27 PM |
|
Is there a really simple "excel" - style api handling program, or is it all raw C or Python or what is everybody doing to do this?
Where do I get started with an easy API programing BOT creation tool?
|
|
|
|
|
maverick1337
Newbie
Offline
Activity: 40
Merit: 0
|
|
May 07, 2013, 03:04:28 AM |
|
I have a question, is there anyway to have a bot send out a notification when the EMA lines cross? I'm sure you guys are initiating buys and sells via EMA (maybe not) but if you are, could you just have it send a notification without trading at all? I know you spend a lot of time and effort in your code but if someone has this functionality, I would greatly appreciate it. You can even delete all the rest of the code, I would just want to be notified when the EMA lines cross. Thanks.
|
|
|
|
anyroll
Newbie
Offline
Activity: 14
Merit: 0
|
|
May 07, 2013, 03:56:28 AM |
|
I have a question, is there anyway to have a bot send out a notification when the EMA lines cross? I'm sure you guys are initiating buys and sells via EMA (maybe not) but if you are, could you just have it send a notification without trading at all? I know you spend a lot of time and effort in your code but if someone has this functionality, I would greatly appreciate it. You can even delete all the rest of the code, I would just want to be notified when the EMA lines cross. Thanks.
+1
|
|
|
|
kokjo
Legendary
Offline
Activity: 1050
Merit: 1000
You are WRONG!
|
|
May 07, 2013, 05:04:31 PM |
|
|
"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
|
|
|
dkstar
Newbie
Offline
Activity: 4
Merit: 0
|
|
May 09, 2013, 11:35:44 AM |
|
Geeze, whats the point of having a "newbie" forum... There is a lot of documentation to go through and it takes those of us with smaller programming vocabularies a lot to get through it all. I solved my problem, so for anyone else having the same issue I read the "FM"... here is some good background on the request module and has a specific section on passing parameter in a url with a keyword argument. You then need to urlencode your parameters. http://docs.python-requests.org/en/latest/index.html
|
|
|
|
WarlockTheGrait
Newbie
Offline
Activity: 2
Merit: 0
|
|
May 30, 2013, 09:58:35 PM |
|
hi everyone. sorry for poor english. i'm trying to move to 1st API vers. our clien(Java). when i'm trying to submint an order with params type - bid amount_int - 10000000 price_int - 2500000000 server returns "" string how i can see magicnumber thats server uses to divide by amount and price is 10^6 (i tryed 10^4 too - in result was "too low amount") can u help?
|
|
|
|
|