wazirx-api
v1.0.12
Published
Wazirx Api for JS
Downloads
16
Readme
WazirxApiNodejs
Wazirx api for NodeJs
Basic Usage
const wazirxApi = require("wazirx-api");
wazirxApi.wazirxInit(YourWazirxSecretKey,YourWazirxApiKey);
async function main() {
try {
const myFunds = await wazirxApi.wazirxGetFundDetails();
console.log(myFunds);
// sell 1 ada at 150 rupeees
const receipt = await wazirxApi.wazirxPlaceNewOrder(
"adainr",
1,
150,
"sell"
);
console.log(receipt);
const status = await wazirxApi.wazirxQueryOrder(receipt.orderId);
console.log(status);
} catch (e) {
/* handle error */
console.error("Error", e);
}
}
main();
wazirx-api
Table of contents
Functions
- wazirxInit
- wazirxGetSystemTime
- wazirxGetExchangeInfo
- wazirxGetOrderBook
- wazirxGetRecentTradeList
- wazirxGetOldTradeList
- wazirxGetAllOdersFor
- wazirxQueryOrder
- wazirxGetAllOpenOders
- wazirxCancelOrder
- wazirxCancelAllOpenOrders
- wazirxPlaceNewOrder
- wazirxPlaceNewOrderTest
- wazirxGetAccountInformation
- wazirxGetFundDetails
Functions
wazirxInit
▸ wazirxInit(secretKey
, apiKey
): void
Initiate Wazirx Api with your keys
Parameters
| Name | Type |
| :------ | :------ |
| secretKey
| string
|
| apiKey
| string
|
Returns
void
Defined in
wazirxGetSystemTime
▸ wazirxGetSystemTime(): Promise
<any
>
Get System time
Returns
Promise
<any
>
Defined in
wazirxGetExchangeInfo
▸ wazirxGetExchangeInfo(): Promise
<any
>
Returns
Promise
<any
>
Defined in
wazirxGetOrderBook
▸ wazirxGetOrderBook(symbol
, limit?
): Promise
<any
>
Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| symbol
| string
| undefined
|
| limit
| number
| 20
|
Returns
Promise
<any
>
Defined in
wazirxGetRecentTradeList
▸ wazirxGetRecentTradeList(symbol
, limit?
): Promise
<any
>
Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| symbol
| string
| undefined
|
| limit
| number
| 500
|
Returns
Promise
<any
>
Defined in
wazirxGetOldTradeList
▸ wazirxGetOldTradeList(symbol
, limit?
, fromId?
): Promise
<any
>
Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| symbol
| string
| undefined
|
| limit
| number
| 500
|
| fromId
| undefined
| number
| undefined
|
Returns
Promise
<any
>
Defined in
wazirxGetAllOdersFor
▸ wazirxGetAllOdersFor(symbol
, limit?
, startTime?
, endTime?
): Promise
<any
>
Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| symbol
| string
| undefined
|
| limit
| number
| 500
|
| startTime?
| number
| undefined
|
| endTime?
| number
| undefined
|
Returns
Promise
<any
>
Defined in
wazirxQueryOrder
▸ wazirxQueryOrder(orderId
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| orderId
| string
|
Returns
Promise
<any
>
Defined in
wazirxGetAllOpenOders
▸ wazirxGetAllOpenOders(symbol?
, orderId?
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| symbol?
| string
|
| orderId?
| string
| number
|
Returns
Promise
<any
>
Defined in
wazirxCancelOrder
▸ wazirxCancelOrder(symbol
, orderId
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| symbol
| string
|
| orderId
| string
|
Returns
Promise
<any
>
Defined in
wazirxCancelAllOpenOrders
▸ wazirxCancelAllOpenOrders(symbol
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| symbol
| string
|
Returns
Promise
<any
>
Defined in
wazirxPlaceNewOrder
▸ wazirxPlaceNewOrder(symbol
, quantity
, price
, side
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| symbol
| string
|
| quantity
| number
|
| price
| number
|
| side
| string
|
Returns
Promise
<any
>
Defined in
wazirxPlaceNewOrderTest
▸ wazirxPlaceNewOrderTest(symbol
, quantity
, price
, side
): Promise
<any
>
Parameters
| Name | Type |
| :------ | :------ |
| symbol
| string
|
| quantity
| number
|
| price
| number
|
| side
| string
|
Returns
Promise
<any
>
Defined in
wazirxGetAccountInformation
▸ wazirxGetAccountInformation(): Promise
<any
>
Returns
Promise
<any
>
Defined in
wazirxGetFundDetails
▸ wazirxGetFundDetails(): Promise
<any
>
Returns
Promise
<any
>