Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
orionx-sdk
Advanced tools
First you need to install it via npm.
npm install orionx-sdk --save
Then you will need to get your credentials, follow this tutorial
After that we are ready to go
// App.js
import Orionx from 'orionx-sdk'
Orionx.setCredentials({
apiKey: '<apiKey>',
secretKey: '<secretKey>',
apiUri: '<https://apiUri.com/graphql>'
})
// And then use this in any Component.js
Orionx.market({code: 'LTCBTC'})
.then(function(market) {
console.log(market)
})
.catch(function(err) {
console.log(err)
})
Cancel an order by id.
await Orionx.cancelOrder({orderId: 'asd73jksslksdf'})
orderId: Id of the order
The createPayment()
creates a new payment and returns its data.
await Orionx.createPayment({
acceptedCurrenciesCodes: ['LTC', 'BTC'],
amount: 1000,
description: 'Testing...',
mainCurrencyCode: 'CLP',
title: 'Test'
})
acceptedCurrenciesCodes: The coin codes that the buyer will be able to use as payment
amount The price in mainCurrencyCode units
description Some descriptive text
mainCurrencyCode The coin that you will recieve
title Some descriptive title
The me()
method returns yours user data.
await Orionx.me()
The market()
method returns the info of a specified market.
await Orionx.market({code: ':marketCode'})
code: Market code
The marketOrderBook()
method returns the info of a specified market order book.
await Orionx.marketOrderBook({marketCode: ':marketCode', limit: 5})
marketCode: Market code
limit Number of buy/sell orders
The markets()
method returns the info of all the markets.
await Orionx.markets()
The placeLimitOrder()
creates and returns a limit order .
await Orionx.placeLimitOrder({marketCode: ':marketCode', amount: :amount, limitPrice: :limitPrice, sell: :sell})
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⁸.
limitPrice The price for the order
sell Boolean that defines if you buy or sell
The placeMarketOrder()
creates and returns a market order .
await Orionx.placeMarketOrder({marketCode: ':marketCode', amount: :amount, sell: :sell})
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
The transactions()
shows all transactions from the given wallet. It's results are paginated.
await Orionx.transactions({walletId: ':walletId', page: :page, limit: :limit })
walletId: The ID of the wallet you want to display the transactions
page: The page of results you want to display.
limit: The number of items per page.
Get a wallet by an id
await Orionx.wallet({currencyCode: ':currencyCode'})
currencyCode: Currency code
Gets all my wallets
await Orionx.wallets()
For further information about, visit our Docs
If you encounter a bug with the Orionx SDK for JavaScript we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of the SDK, Node.js and OS you’re using.
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
Official Orionx SDK for Node.js
The npm package orionx-sdk receives a total of 29 weekly downloads. As such, orionx-sdk popularity was classified as not popular.
We found that orionx-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.