import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { PostTradeBankModel } from '../model/postTrade'; import { TradeBankModel } from '../model/trade'; import { TradeListBankModel } from '../model/tradeList'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export declare class TradesService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string, configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * Create Trade * Creates a trade. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the trade details in our private store | | pending | The Platform has stored the trade details and is processing it | | executed | The Platform has processed the trade and needs to settle it | | settling | The Platform has executed the trade and is settling the funds | | cancelled | The Platform has cancelled the trade | | completed | The Platform has successfully completed the trade | | failed | The Platform was not able to successfully complete the trade | ## Failure codes | Code | Description | |------|-------------| | non_sufficient_funds | The delivery account does not have enough funds to complete the trade | | unsupported | The trading pair is not supported for this customer | | limit_exceeded | The customer is over the limits that have been set for them for this activity | | daily_limit_exceeded | The customer is over their daily limits for this activity | | weekly_limit_exceeded | The customer is over their weekly limits for this activity | | monthly_limit_exceeded | The customer is over their monthly limits for this activity | | expired_quote | The quote expired before it could be executed | | market_volatility | The quote could not be executed due to market volatility | | not_filled | The trade could not be filled based on the amounts specified | Required scope: **trades:execute** * @param postTradeBankModel * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ createTrade(postTradeBankModel: PostTradeBankModel, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; createTrade(postTradeBankModel: PostTradeBankModel, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; createTrade(postTradeBankModel: PostTradeBankModel, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get Trade * Retrieves a trade. Required scope: **trades:read** * @param tradeGuid Identifier for the trade. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getTrade(tradeGuid: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getTrade(tradeGuid: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getTrade(tradeGuid: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get trades list * Retrieves a listing of trades. Records are sorted by creation date in descending order. Required scope: **trades:read** * @param page The page index to retrieve. * @param perPage The number of entities per page to return. * @param guid Comma separated trade_guids to list trades for. * @param bankGuid Comma separated bank_guids to list trades for. * @param customerGuid Comma separated customer_guids to list trades for. * @param accountGuid Comma separated account_guids to list trades for. * @param state Comma separated states to list trades for. * @param side Comma separated sides to list trades for. * @param label Comma separated labels to list trades for. * @param createdAtGte Created at start date-time inclusive lower bound, ISO8601. * @param createdAtLt Created at end date-time exclusive upper bound, ISO8601. * @param updatedAtGte Updated at start date-time inclusive lower bound, ISO8601. * @param updatedAtLt Updated at end date-time exclusive upper bound, ISO8601. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ listTrades(page?: string, perPage?: string, guid?: string, bankGuid?: string, customerGuid?: string, accountGuid?: string, state?: string, side?: string, label?: string, createdAtGte?: string, createdAtLt?: string, updatedAtGte?: string, updatedAtLt?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; listTrades(page?: string, perPage?: string, guid?: string, bankGuid?: string, customerGuid?: string, accountGuid?: string, state?: string, side?: string, label?: string, createdAtGte?: string, createdAtLt?: string, updatedAtGte?: string, updatedAtLt?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; listTrades(page?: string, perPage?: string, guid?: string, bankGuid?: string, customerGuid?: string, accountGuid?: string, state?: string, side?: string, label?: string, createdAtGte?: string, createdAtLt?: string, updatedAtGte?: string, updatedAtLt?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }