TypeScript monorepo for building a Tiger OpenAPI SDK across multiple runtimes and deployment environments.
The repository currently exposes one public package with a browser subpath export:
tiger-openapitiger-openapi/browser
It also supports multiple runtime targets at the architecture level:
Important
This is not the official NodeJS SDK, and currently it's still under development.
Before you start to use this api, ensure you have opened tiger api call. Or you can visit this page to start.
If any bug, please open an issue
# via pnpm
pnpm add tiger-openapi
# via npm
npm i tiger-openapi
# via yarn
yarn add tiger-openapiimport { TigerClient, createTigerClient } from 'tiger-openapi';
const tiger = new TigerClient({
tigerId: '...',
account: '...',
privateKey: '-...',
});
// or
const tiger = createTigerClient({
tigerId: '...',
account: '...',
privateKey: '-...',
});import { TigerClient, createTigerClient } from 'tiger-openapi/browser';
// apply in tiger openapi page
const tiger = new TigerClient({
tigerId: '...',
account: '...',
privateKey: '-...',
});
// or
const tiger = createTigerClient({
tigerId: '...',
account: '...',
privateKey: '-...',
});Here is some example about how to call the quote / account / order api, you can visit the examples for more details.
For more details please check the API document.
await tiger.quote.common.grabQuotePermission();
await tiger.quote.common.getQuotePermission();
await tiger.quote.common.getKlineQuote({
/* */
});For more details please check the API document.
await tiger.quote.crypto.getSymbols();For more details please check the API document
await client.quote.funds.getFundSymbols();For more details please check the API document
await client.quote.futures.getFutureExchanges();Please ensure you have permission to enable query options before you call the API.
await tiger.quote.options.getOptionExpirations({
/* */
});
await tiger.quote.options.getOptionBriefs({
/* */
});For more details about Options, please check the document.
Please ensure you have permission to enable query stock before you call the API.
await tiger.quote.stock.getMarketStatus({
/* */
});
await tiger.quote.stock.getTradingCalendar({
/* */
});For more details please check the API document about stock.
For more details please check the API document about warrant.
await tiger.quote.warrants.getWarrantBriefs({
/* */
});For more details please check the API document about warrant.
const accountInfo = await client.account.getAccountInfo();
console.log('accountInfo::', accountInfo);
const accountBalance = await client.account.getAccountBalance();
console.log('accountBalance::', accountBalance);For more details please check the API document about warrant.
// 1. getContract
const contract = await client.order.getContract({ symbol: 'AAPL', sec_type: 'STK' });
logResult('getContract', contract);
// 2. getContracts
const contracts = await client.order.getContracts({ symbols: ['AAPL'], sec_type: 'STK' });
logResult('getContracts', contracts);This is still development.
Licensed under the GPL-3.0