UNPKG

@investingwolf/alpaca-broker-api

Version:
101 lines (100 loc) 3.67 kB
/** * 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 { BatchJournalRequest } from '../model/batchJournalRequest'; import { BatchJournalResponse } from '../model/batchJournalResponse'; import { JournalData } from '../model/journalData'; import { JournalResource } from '../model/journalResource'; import { Authentication, Interceptor } from '../model/models'; import { HttpBasicAuth } from '../model/models'; export declare enum JournalsApiApiKeys { } export declare class JournalsApi { 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: JournalsApiApiKeys, value: string): void; set username(username: string); set password(password: string); addInterceptor(interceptor: Interceptor): void; /** * You can cancel journals while they are in the pending status. An attempt to cancel already-executed journals will return an error. * @summary Cancel a pending journal. * @param journalId */ deleteJournal(journalId: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: http.IncomingMessage; body?: any; }>; /** * * @summary Return a list of requested journals. * @param after by settle_date * @param before by settle_date * @param status * @param entryType * @param toAccount * @param fromAccount */ getJournals(after?: string, before?: string, status?: 'pending' | 'canceled' | 'executed', entryType?: 'JNLC' | 'JNLS', toAccount?: string, fromAccount?: string, options?: { headers: { [name: string]: string; }; }): Promise<{ response: http.IncomingMessage; body: Array<JournalResource>; }>; /** * A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away. * @summary Request a journal. * @param journalData */ postJournals(journalData: JournalData, options?: { headers: { [name: string]: string; }; }): Promise<{ response: http.IncomingMessage; body: JournalResource; }>; /** * * @summary Create a batch journal * @param batchJournalRequest */ postJournalsBatch(batchJournalRequest: BatchJournalRequest, options?: { headers: { [name: string]: string; }; }): Promise<{ response: http.IncomingMessage; body: Array<BatchJournalResponse>; }>; }