Skip to content

Commit

Permalink
ccxt#94 btcchina unified createOrder return
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Aug 10, 2017
1 parent bf84c3a commit 6567e2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -4245,7 +4245,11 @@ var btcchina = {
} else {
order['params'] = [ price, amount, id ];
}
return this[method] (this.extend (order, params));
let response = await this[method] (this.extend (order, params));
return {
'info': response,
'id': response['id'],
};
},

async cancelOrder (id, params = {}) {
Expand Down
4 changes: 2 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let ccxt = require ('ccxt')

let exchange = new ccxt.bitfinex ({
apiKey: '5A1VikyEtDpmFkrzX4e52LsaVgCxXyMnY9JElqvNMxo',
secret: 'Rgxxw1BGnq6NLTLq1hn0oQ5FBDRLYFFVRzyEKYbz1io',
apiKey: '4FlEDtxDl35gdEiobnfZ72vJeZteE4Bb7JdvqzjIjHq',
secret: 'D4DXM8DZdHuAq9YptUsb42aWT1XBnGlIJgLi8a7tzFH',
})

await exchange.loadMarkets ()
Expand Down
2 changes: 1 addition & 1 deletion keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"bit2c": { "apiKey": "5296814c-b1dc-4201-a62a-9b2364e890da", "secret": "8DC1100F7CAB0AE6FE72451C442BE7B111404CBD569CE6162F8F2122CAEB211C" },
"bitbay": { "apiKey": "3faec3e5458d24809a68fbaf0e97245b", "secret": "2ffb20992e10dd54fd4fd4133cc09b00" },
"bitcoincoid": { "apiKey": "OEJGH4SX-5AKKDJUL-FXS0WTM8-NLLGG0FK-S52DHUJJ", "secret": "9c0d8c88c3d4f121cfe6279ca4276f2519b59a39369781b378034d608460a9c2591ea6e64e604807" },
"bitfinex": { "apiKey": "ZNdP6lB90nPKEnOSg2RA2Cg2CVVMTgJLCeaoLpnAk15", "secret": "opBu1JIYj9QJbVpcXU6jAmfwIxHsx252xkh11z6tI1S" },
"bitfinex": { "apiKey": "4FlEDtxDl35gdEiobnfZ72vJeZteE4Bb7JdvqzjIjHq", "secret": "D4DXM8DZdHuAq9YptUsb42aWT1XBnGlIJgLi8a7tzFH" },
"bitlish": { "apiKey": "fixed:N5lK4iokAc9ajk0Z8pvHfpoJsyzNzQ2nespNH/mY7is", "login": "[email protected]", "password": "VfvfVskfHfve229!" },
"bitmarket": { "apiKey": "2024227b532f27d7ced1987653029d91", "secret": "3af0b6c6db5661c4b84ad1624b9702b5" },
"bitmex": { "apiKey": "1iRpd8vvth4DjK1AHi1g70s5", "secret": "nCREogmz5Y96QzOFjygRuBeF5-ALVrLQ5vC0GhCTlx_1JtAD" },
Expand Down

0 comments on commit 6567e2a

Please sign in to comment.