@investingwolf/alpaca-broker-api
Version:
Node.js client for alpaca broker API
79 lines (78 loc) • 2.44 kB
TypeScript
/**
* Alpaca Broker API
* Open brokerage accounts, enable commission-free trading, and manage the ongoing user experience with Alpaca Broker API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/// <reference types="node" />
import http from 'http';
import { AssetResource } from '../model/assetResource';
import { Authentication, Interceptor } from '../model/models';
import { HttpBasicAuth } from '../model/models';
export declare enum AssetsApiApiKeys {
}
export declare class AssetsApi {
protected _basePath: string;
protected _defaultHeaders: any;
protected _useQuerystring: boolean;
protected authentications: {
default: Authentication;
BasicAuth: HttpBasicAuth;
};
protected interceptors: Interceptor[];
constructor(basePath?: string);
constructor(username: string, password: string, basePath?: string);
set useQuerystring(value: boolean);
set basePath(basePath: string);
set defaultHeaders(defaultHeaders: any);
get defaultHeaders(): any;
get basePath(): string;
setDefaultAuthentication(auth: Authentication): void;
setApiKey(key: AssetsApiApiKeys, value: string): void;
set username(username: string);
set password(password: string);
addInterceptor(interceptor: Interceptor): void;
/**
* Returns the requested asset, if found
* @summary Retrieve an asset by UUID
* @param assetId The UUID of the required asset
*/
getAssetById(assetId: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
* Returns the requested asset, if found
* @summary Retrieve an asset by symbol
* @param symbol The symbol of the required asset
*/
getAssetBySymbol(symbol: string, options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body?: any;
}>;
/**
* Returns all assets
* @summary Retrieve all assets
*/
getAssets(options?: {
headers: {
[name: string]: string;
};
}): Promise<{
response: http.IncomingMessage;
body: Array<AssetResource>;
}>;
}