-
Notifications
You must be signed in to change notification settings - Fork 0
Request info: (ascii, utf-8) key-value pairs
Response info: JSON
Response code: 200 if it worked, {4,5}xx if there was an error
GET example.com**/api/overview.js**
{ "req_url": "https://mtgox.com/code/(function_name).php", "req_method": "POST", "post_body_encoding": "application/x-www-form-urlencoded",// or "application/json" "req_authentication_type": (integer) // 1: // To authenticate with (account identifier, authkey {type:"password", password:"...password..."}): // include params: name=(account identifier), pass=(authkey.password) // 2: // To authenticate with (account identifier, authkey {type:"hmac-sha256", token:"...", key:"..."}): // include params: // f=(function name) // account=(token) // nonce_ms=(ms since 1970) // nonce_random="(random token)" // include HTTP headers: // X-Signature: ...base64... // X-Authkey-Token: (authkey.token) "supported_functions": [ // e.g. for Mt Gox at the moment: "send-btc", "my-balance", "place-order", "my-open-orders", "cancel-order" ] }
to_btc_address="..." amount="17.50" ------------- {}
------------- {"btc_address": "..."}
------------- { "available": { "btc": "17.50" "usd": "0.02" } "pending": { "btc": "5000.0" } }
trade_amt="0.39" trade_cur="USD" for_amt="1.05" for_cur="BTC" ------------- {"oid": "..."}
oid="..." -------------
------------- TODO
Mt Gox says "coming soon"
Mt Gox says "coming soon"
transfer_json=json_encode({ identity_url: "..." identity_public_key: "...base64 of TODO..." bitcoin_transfer: "...base64 of TODO..." }) identity_signature="...base64 of TODO..." coinholder_signature="...base64 of TODO..." -------------
An invoice is a bitcoin address, an amount, a currency, and optional extra info.
A currency of BTC means "please send me (amount) BTC"
A non-BTC currency means "please send me (X) BTC along with an option you've purchased (to trade (X) BTC for (amount) (currency) in the next 30 seconds)". This probably won't be implemented for a while...
{ // a one-time address, so it can also serve to identify the invoice "btc_address": "..." "amount": "17.05" "currency": "BTC" info: { // all fields are optional: hub_url: "..." memo: "..." t: ms since 1970 lat: "..." lng: "..." random: "..." } }
Normally you'd just use a normal Bitcoin transfer, possibly expedited via things like attach-identity-to-transfer
. You'd only use this call when you need to include an option.
TODO -------------
invoice_json="..." signature="...base64 of TODO..." -------------
invoice_bitcoin_address="..." signature="...base64 of TODO..." -------------
all request params are optional
t= lat= lng= random= ------------- invoices: [{...}, ...] more_exist: true/false
------------- { "account": "..." "authkey": {...} }
------------- {"authkey": {...}}
TODO -------------