@master-chief/alpaca-ts
Version:
A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
44 lines (43 loc) • 1.68 kB
TypeScript
import { BaseHttpRequest } from "../rest/BaseHttpRequest.js";
import type { Assets } from "../entities/Assets.js";
import type { CancelablePromise } from "../rest/CancelablePromise.js";
/**
* Get Assets
* The assets API serves as the master list of assets available for trade and data consumption from Alpaca. Assets are sorted by asset class, exchange and symbol.
* @returns Assets An array of asset objects
* @throws ApiError
*/
export declare const getAssets: (httpRequest: BaseHttpRequest, { status, assetClass, exchange, attributes, }: {
/**
* e.g. “active”. By default, all statuses are included.
*/
status?: string;
/**
* Defaults to us_equity.
*/
assetClass?: string;
/**
* Optional AMEX, ARCA, BATS, NYSE, NASDAQ, NYSEARCA or OTC
*/
exchange?: string;
/**
* Comma separated values to query for more than one attribute.
*/
attributes?: string;
}) => CancelablePromise<Array<Assets>>;
/**
* Get an Asset by ID or Symbol
* Get the asset model for a given symbol or asset_id. The symbol or asset_id should be passed in as a path parameter.
*
* **Note**: For crypto, the symbol has to follow old symbology, e.g. BTCUSD.
*
* **Note**: For coin pairs, the symbol should be separated by spare symbol (/), e.g. BTC/USDT. Since spare is a special character in HTTP, use the URL encoded version instead, e.g. /v2/assets/BTC%2FUSDT
* @returns Assets An Asset object
* @throws ApiError
*/
export declare const getAssetBySymbolOrId: (httpRequest: BaseHttpRequest, { symbolOrAssetId, }: {
/**
* symbol or assetId
*/
symbolOrAssetId: string;
}) => CancelablePromise<Assets>;