Delete quadrigacx.js
This commit is contained in:
parent
a1901dff50
commit
fe1878129b
1 changed files with 0 additions and 28 deletions
|
|
@ -1,28 +0,0 @@
|
|||
const common = require('../../common/quadrigacx')
|
||||
const coinUtils = require('../../../coin-utils')
|
||||
|
||||
function buy (account, cryptoAtoms, fiatCode, cryptoCode) {
|
||||
return trade('buy', account, cryptoAtoms, fiatCode, cryptoCode)
|
||||
}
|
||||
|
||||
function sell (account, cryptoAtoms, fiatCode, cryptoCode) {
|
||||
return trade('sell', account, cryptoAtoms, fiatCode, cryptoCode)
|
||||
}
|
||||
|
||||
function trade (type, account, cryptoAtoms, fiatCode, cryptoCode) {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
const market = common.buildMarket(fiatCode, cryptoCode)
|
||||
const options = {
|
||||
book: market,
|
||||
amount: coinUtils.toUnit(cryptoAtoms, cryptoCode).toFixed(8)
|
||||
}
|
||||
|
||||
return common.authRequest(account, '/' + type, options)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
buy,
|
||||
sell
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue