@alpacahq/typescript-sdk
Version:
A TypeScript SDK for the https://alpaca.markets REST API and WebSocket streams.
16 lines (15 loc) • 1.99 kB
JavaScript
// If `APCA_DEBUG` false, console.debug() should not log anything.
import * as dntShim from "./_dnt.shims.js";
if (JSON.parse(dntShim.Deno.env.get("APCA_DEBUG") || "false")) {
console.debug = () => { };
}
else {
// Prefix all debug logs with "@alpacahq/typescript-sdk" to make it easier to
// for users to filter out debug logs from this SDK.
console.debug = (...args) => console.log("@alpacahq/typescript-sdk:debug", ...args);
}
export { getCryptoBars, getCryptoQuotes, getCryptoQuotesLatest, getCryptoSnapshots, getCryptoTrades, getCryptoTradesLatest, getForexRates, getLatestCryptoBars, getLatestCryptoOrderbooks, getLatestForexRates, getLogo, getNews, getOptionsBars, getOptionsExchanges, getOptionsSnapshots, getOptionsTrades, getOptionsTradesLatest, getStocksAuctions, getStocksBars, getStocksBarsLatest, getStocksConditions, getStocksCorporateActions, getStocksExchangeCodes, getStocksMarketMovers, getStocksMostActives, getStocksQuotes, getStocksQuotesLatest, getStocksSnapshots, getStocksTrades, getStocksTradesLatest, } from "./api/marketData.js";
export { cancelOrder, cancelOrders, closePosition, closePositions, createCryptoTransfer, createOrder, createWatchlist, deleteWatchlist, exerciseOption, getAccount, getActivities, getActivity, getAsset, getAssets, getCalendar, getClock, getConfigurations, getCorporateAction, getCorporateActions, getCryptoTransfer, getCryptoTransfers, getCryptoWallet, getCryptoWallets, getCryptoWhitelistedAddress, getCryptoWhitelistedAddresses, getFeeEstimate, getOptionsContract, getOptionsContracts, getOrder, getOrders, getPortfolioHistory, getPosition, getPositions, getWatchlist, getWatchlists, removeCryptoWhitelistedAddress, replaceOrder, requestCryptoWhitelistedAddress, updateConfigurations, updateWatchlist, } from "./api/trade.js";
export { baseURLs, createClient, } from "./factory/createClient.js";
export { createTokenBucket, } from "./factory/createTokenBucket.js";
export { mockFetch, } from "./util/mockFetch.js";