![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
coinex.com
Advanced tools
This module fully implements tha Coinex API. The full documentation for the API is available on the API Wiki Page.
It is written in Coffescript V2 using native Promises and its only dependencies are bent and md5.js. You do not need Coffeescript to use the library; it is pre-compiled to Javascript ES6.
npm install coinex.com
Get your API key and secret key from here.
Coinex = require('coinex.com');
const API_KEY = 'F42F1492623D47EE861B7150E335AA89';
const SECRET = '8B678410AF2D46ABB70910D08E4DEAE114F014971E3A4759'
const coinex = new Coinex(API_KEY, SECRET);
coinex.balance()
.then(response => console.log(response));
.catch(err => console.error(err.code, err.message);
const coinex = new Coinex(API_KEY, SECRET);
All the following methods return native Promises which are resolved
on a valid response or rejected on error. Each method returns a
single result object to the .then()
.
For each method, please see the API documentation. Below
I have simply documented the call; the response will generally
be the data
part of the response as documented by Coinex.
If internally Coinex returns an error code of greater than zero,
the promise will be rejected with a CoinexError.
The returned result will have floating point numbers for values
rather than the string number values returned by the API. Where a
pair
is refered to below, it is the market, for example BTCBCH
.
Returns a list of the available pairs.
coinex.list()
Get the ticker information for a single pair.
coinex.ticker(pair)
Get the ticker information for all pairs.
coinex.tickerAll()
Get the buy / sell statistics. This will return up to 100 lines and the decimal places can be set between zero and eight.
coinex.depth(pair, [limit], [decimal-places]);
If not passed, limit
is set to 100 and decimal-places is set to
eight.
Get the latest transaction data. This will return up to 1,000 lines of data.
coinex.transactions(pair, [lastID]);
Get the k-line data for a specific period, including the last 1,000 data points.
coinex.kline(pair, [type]);
Type can be one of 1min
, 3min
, 5min
, 15min
, 30min
,
1hour
, 2hour
, 4hour
,6hour
,12hour
, 1day
, 3day
, 1week
.
Type defaults to 1hour
if not passed.
Returns the balance of each currency currently on the account.
coinex.balance()
Places a new order.
coinex.placeLimitOrder(pair, type, amount, price, [sourceID]);
Type must be buy
or sell
. SourceID is uptional and will be returned
in the response, if provided.
Places a new market order.
coinex.placeMarketOrder(pair, type, amount);
Cancels an existing order
coinex.cancelOrder(pair, id);
This will return a list of orders that have not been filled nor cancelled.
coinex.pending(pair, [page], [limit]);
Page defaults to one and limit defaults to 100. Using the result, it is possibe to page through many transactions.
This will return a list of closed orders. Note that fully cancelled orders will not appear here.
coinex.completed(pair, [page], [limit]);
This returns the status of a single order.
coinex.orderStatus(pair, id);
This returns the history of the user's deals for the given pair.
coinex.history(pair, [page], [limit]);
API errors are returned as a code and a description. In this library
they are returned as a class CoinexError
. These will work like
normal nodejs errors but should usually be caught with a .catch(err)
statement. For example:
coinex.cancelOrder('BTCBCH', 3242404);
.then(data => console.log(data));
.catch(err => console.error(err.code, err.message);
Please report any bugs or make any suggestions at the Github Issue page.
FAQs
API Interface for coinex.com Bitcoin Cash exchange.
The npm package coinex.com receives a total of 2 weekly downloads. As such, coinex.com popularity was classified as not popular.
We found that coinex.com demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.