okx-typescript-api
v1.0.13
Published
typescript module for okx.com API ([email protected])
Downloads
10
Maintainers
Readme
okx-typescript-api
This is created to hanlde OKX API.
Installation
depending on the package manager
NPM
npm i --save okx-typescript-api
YARN
yarn add okx-typescript-api
For Example
import { HttpApi } from "okx-typescript-api";
import { OrderInpoutDto } from "okx-typescript-api/dist/src/dto/order.dto";
const bootstrap = async () => {
const okxHttp = new HttpApi(
'okx-key',
'okx-secret',
'passphrase'
);
const orderInp :OrderInpoutDto = {
instId:"DOT-USDT",
side:"buy",
ccy:"USDT",
sz:"5",
tdMode:"cash",
ordType:"limit",
px:"0.67"
}
const tmp = await okxHttp.placeOrder(orderInp);
console.log(tmp);
};
bootstrap();