orionx-sdk
Advanced tools
Comparing version 0.1.5 to 0.2.0
{ | ||
"name": "orionx-sdk", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "Help developers with Orionx integrations", | ||
@@ -10,3 +10,3 @@ "main": "build/index.js", | ||
"pretest": "sh .env", | ||
"test": "ava --fail-fast --verbose", | ||
"test": "ava --fail-fast --serial --verbose", | ||
"circleci-test": "ava --fail-fast --verbose" | ||
@@ -13,0 +13,0 @@ }, |
@@ -121,2 +121,21 @@ <p align="center"> | ||
### placeMarketOrder | ||
The `placeMarketOrder()` creates and returns a market order . | ||
```js | ||
await Orionx.placeMarketOrder({marketCode: ':marketCode', amount: :amount, sell: :sell}) | ||
``` | ||
#### Params | ||
**marketCode:** Market code | ||
**amount** The amount to be bought or sold, this amount must be multiplied by 10 ^ (unit amount) | ||
For example BTC units = 8 so to sell 1 BTC amount should be 1 \* 10⁸. | ||
**sell** Boolean that defines if you buy or sell | ||
--- | ||
## Docs | ||
@@ -123,0 +142,0 @@ |
import gql from 'graphql-tag' | ||
// const errorText = param => `Missing ${param}, try with Orionx.createPayment({acceptedCurrenciesCodes: [], })` | ||
export default async function(variables) { | ||
@@ -5,0 +4,0 @@ const { |
import createPayment from './createPayment' | ||
import placeMarketOrder from './placeMarketOrder' | ||
export default { | ||
createPayment | ||
createPayment, | ||
placeMarketOrder | ||
} |
import test from 'ava' | ||
import Orionx from '../../src' | ||
import setOrionxCredentials from '../../src/helpers/setOrionxCredentials' | ||
import delay from '../../src/helpers/delay' | ||
@@ -22,1 +23,5 @@ test.beforeEach(t => { | ||
}) | ||
test.afterEach(async t => { | ||
await delay() | ||
}) |
import test from 'ava' | ||
import Orionx from '../../src' | ||
import setOrionxCredentials from '../../src/helpers/setOrionxCredentials' | ||
import delay from '../../src/helpers/delay' | ||
@@ -18,1 +19,5 @@ test.beforeEach(t => { | ||
}) | ||
test.afterEach(async t => { | ||
await delay() | ||
}) |
import test from 'ava' | ||
import Orionx from '../../src' | ||
import setOrionxCredentials from '../../src/helpers/setOrionxCredentials' | ||
import delay from '../../src/helpers/delay' | ||
@@ -20,1 +21,5 @@ test.beforeEach(t => { | ||
}) | ||
test.afterEach(async t => { | ||
await delay() | ||
}) |
import test from 'ava' | ||
import Orionx from '../../src' | ||
import setOrionxCredentials from '../../src/helpers/setOrionxCredentials' | ||
import delay from '../../src/helpers/delay' | ||
@@ -17,1 +18,5 @@ test.beforeEach(t => { | ||
}) | ||
test.afterEach(async t => { | ||
await delay() | ||
}) |
41524
40
900
151