Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

orionx-sdk

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orionx-sdk - npm Package Compare versions

Comparing version 1.3.10 to 1.3.11

2

package.json
{
"name": "orionx-sdk",
"version": "1.3.10",
"version": "1.3.11",
"description": "Help developers with Orionx integrations",

@@ -5,0 +5,0 @@ "main": "build/index.js",

import gql from 'graphql-tag'
export default async function({ code }) {
if (!code)
throw new Error('code missing, try with Orionx.market({code: \'LTCBTC\'})')
const query = gql`
query getMarket($code: ID) {
market(code: $code) {
name
code
lastTrade {
price
}
mainCurrency {
code
units
format
symbol
}
secondaryCurrency {
code
units
format
symbol
}
}
}
`
const response = await this.graphql({ query, variables: { code } })
return response.market
export default async function ({code}) {
if (!code) throw new Error('code missing, try with Orionx.market({code: \'LTCBTC\'})')
const query = gql`
query getMarket($code: ID) {
market(code: $code) {
name
code
lastTrade {
price
}
mainCurrency {
code
units
format
symbol
}
secondaryCurrency {
code
units
format
symbol
}
}
}
`
const response = await this.graphql({query, variables: {code}})
return response.market
}
import gql from 'graphql-tag'
export default async function({ marketCode, limit }) {
if (!marketCode)
throw new Error(
'marketCode missing, try with Orionx.marketOrderBook({marketCode: \'LTCBTC\', limit: 5})'
)
export default async function ({marketCode, limit}) {
if (!marketCode)
throw new Error(
'marketCode missing, try with Orionx.marketOrderBook({marketCode: \'LTCBTC\', limit: 5})'
)
if (!limit)
throw new Error(
'limit missing, try with Orionx.marketOrderBook({marketCode: \'LTCBTC\', limit: 5})'
)
if (!limit)
throw new Error(
'limit missing, try with Orionx.marketOrderBook({marketCode: \'LTCBTC\', limit: 5})'
)
const query = gql`
query marketOrderBook($marketCode: ID!, $limit: Int) {
marketOrderBook(marketCode: $marketCode, limit: $limit) {
sell {
amount
limitPrice
}
buy {
amount
limitPrice
}
spread
mid
}
}
`
const response = await this.graphql({
query,
variables: { marketCode, limit }
})
return response.marketOrderBook
const query = gql`
query marketOrderBook($marketCode: ID!, $limit: Int) {
marketOrderBook(marketCode: $marketCode, limit: $limit) {
sell {
amount
limitPrice
}
buy {
amount
limitPrice
}
spread
mid
}
}
`
const response = await this.graphql({
query,
variables: {marketCode, limit}
})
console.log('response', response)
return response.marketOrderBook
}
import gql from 'graphql-tag'
export default async function() {
const query = gql`
query {
markets {
code
name
mainCurrency {
code
name
units
}
secondaryCurrency {
code
name
units
}
}
}
`
const response = await this.graphql({ query, variables: {} })
return response.markets
export default async function () {
const query = gql`
query {
markets {
code
name
mainCurrency {
code
name
units
}
secondaryCurrency {
code
name
units
}
}
}
`
const response = await this.graphql({query, variables: {}})
return response.markets
}
import gql from 'graphql-tag'
export default async function() {
const query = gql`
query {
me {
_id
name
email
createdAt
}
}
`
const response = await this.graphql({ query, variables: {} })
return response.me
export default async function () {
const query = gql`
query {
me {
_id
name
email
createdAt
}
}
`
const response = await this.graphql({query, variables: {}})
return response.me
}
import gql from 'graphql-tag'
export default async function({marketCode, limit}) {
export default async function ({marketCode, limit}) {
if (!marketCode)
throw new Error("Missing marketCode, try Orionx.openOrders({marketCode: 'BTCCLP'})")
throw new Error('Missing marketCode, try Orionx.openOrders({marketCode: \'BTCCLP\'})')

@@ -7,0 +7,0 @@ if (!limit) limit = 15

import gql from 'graphql-tag'
export default async function({ currencyCode }) {
if (!currencyCode)
throw new Error(
'Missing currencyCode, try Orionx.wallet({currencyCode: \'CLP\'})'
)
export default async function ({currencyCode}) {
if (!currencyCode)
throw new Error('Missing currencyCode, try Orionx.wallet({currencyCode: \'CLP\'})')
const query = gql`
query getWallet($currencyCode: ID!) {
me {
_id
wallet(currencyCode: $currencyCode) {
_id
balance
availableBalance
currency {
code
name
symbol
format
}
}
}
}
`
const response = await this.graphql({ query, variables: { currencyCode } })
const query = gql`
query getWallet($currencyCode: ID!) {
me {
_id
wallet(currencyCode: $currencyCode) {
_id
balance
availableBalance
currency {
code
name
symbol
format
}
}
}
}
`
const response = await this.graphql({query, variables: {currencyCode}})
return response.me.wallet
return response.me.wallet
}
import gql from 'graphql-tag'
export default async function() {
const query = gql`
query {
me {
_id
wallets {
_id
balance
availableBalance
currency {
code
name
symbol
format
units
}
}
}
}
`
const response = await this.graphql({query, variables: {}})
export default async function () {
const query = gql`
query {
me {
_id
wallets {
_id
balance
availableBalance
currency {
code
name
symbol
format
units
}
}
}
}
`
const response = await this.graphql({query, variables: {}})
return response.me.wallets
return response.me.wallets
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc