@meteraprotocol/sdk
Version:
SDK to interact with Metera's API & a UI component that will create orders into the Metera Protocol
1,253 lines (1,245 loc) • 38.4 kB
TypeScript
import * as axios from 'axios';
import { RawAxiosRequestConfig, AxiosInstance, AxiosPromise } from 'axios';
/**
* Metera API
* API swagger documentation of sdk
*
* 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.
*/
interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
serverIndex?: number;
baseOptions?: any;
formDataCtor?: new () => any;
}
declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}
/**
* Metera API
* API swagger documentation of sdk
*
* 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.
*/
/**
*
* @export
* @interface RequestArgs
*/
interface RequestArgs {
url: string;
options: RawAxiosRequestConfig;
}
/**
*
* @export
* @class BaseAPI
*/
declare class BaseAPI {
protected basePath: string;
protected axios: AxiosInstance;
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
}
/**
*
* @export
* @interface CreateOrderDeposit
*/
interface CreateOrderDeposit {
/**
* Cardano address in Bech32
* @type {string}
* @memberof CreateOrderDeposit
*/
address: string;
/**
* Portfolio ID for the operation
* @type {string}
* @memberof CreateOrderDeposit
*/
portfolioId: string;
/**
* Tokens involved in the operation
* @type {Array<CreateOrderDepositTokensInner>}
* @memberof CreateOrderDeposit
*/
tokens: Array<CreateOrderDepositTokensInner>;
/**
* Maximum batcher fee for the operation
* @type {string}
* @memberof CreateOrderDeposit
*/
maxBatcherFee: string;
/**
* Minimum MTK acceptable for deposits
* @type {string}
* @memberof CreateOrderDeposit
*/
minMtkAcceptable: string;
}
/**
*
* @export
* @interface CreateOrderDepositTokensInner
*/
interface CreateOrderDepositTokensInner {
/**
* Token ID
* @type {string}
* @memberof CreateOrderDepositTokensInner
*/
id: string;
/**
* Token amount
* @type {string}
* @memberof CreateOrderDepositTokensInner
*/
amount: string;
}
/**
* @type CreateOrderResponse
* @export
*/
type CreateOrderResponse = CreateOrderResponse200 | ErrorResponse;
/**
*
* @export
* @interface CreateOrderResponse200
*/
interface CreateOrderResponse200 {
/**
*
* @type {string}
* @memberof CreateOrderResponse200
*/
cbor: string;
/**
*
* @type {string}
* @memberof CreateOrderResponse200
*/
id: string;
}
/**
*
* @export
* @interface CreateOrderWithdraw
*/
interface CreateOrderWithdraw {
/**
* Cardano address in Bech32
* @type {string}
* @memberof CreateOrderWithdraw
*/
address: string;
/**
* Portfolio ID for the operation
* @type {string}
* @memberof CreateOrderWithdraw
*/
portfolioId: string;
/**
* Tokens involved in the operation
* @type {Array<CreateOrderDepositTokensInner>}
* @memberof CreateOrderWithdraw
*/
tokens: Array<CreateOrderDepositTokensInner>;
/**
* Maximum batcher fee for the operation
* @type {string}
* @memberof CreateOrderWithdraw
*/
maxBatcherFee: string;
/**
* Amount for withdrawals
* @type {string}
* @memberof CreateOrderWithdraw
*/
amount: string;
/**
* Minimum worth acceptable for withdrawals
* @type {string}
* @memberof CreateOrderWithdraw
*/
minWorthAcceptable: string;
}
/**
* @type CreateSwapResponse
* @export
*/
type CreateSwapResponse = CreateSwapResponse200 | ErrorResponse;
/**
*
* @export
* @interface CreateSwapResponse200
*/
interface CreateSwapResponse200 {
/**
* Unsigned transaction CBOR
* @type {string}
* @memberof CreateSwapResponse200
*/
cbor: string;
/**
* Transaction ID
* @type {string}
* @memberof CreateSwapResponse200
*/
txId: string;
}
/**
*
* @export
* @interface ErrorResponse
*/
interface ErrorResponse {
/**
* Error type or code
* @type {string}
* @memberof ErrorResponse
*/
error: string;
/**
* Detailed error message
* @type {string}
* @memberof ErrorResponse
*/
message: string;
}
/**
* @type GetPortfolioPriceResponse
* @export
*/
type GetPortfolioPriceResponse = Array<GetPortfolioPriceResponse200Inner> | ErrorResponse;
/**
*
* @export
* @interface GetPortfolioPriceResponse200Inner
*/
interface GetPortfolioPriceResponse200Inner {
/**
*
* @type {string}
* @memberof GetPortfolioPriceResponse200Inner
*/
date: string;
/**
*
* @type {string}
* @memberof GetPortfolioPriceResponse200Inner
*/
price: string;
}
/**
* @type GetPortfolioStateResponse
* @export
*/
type GetPortfolioStateResponse = ErrorResponse | GetPortfolioStateResponse200;
/**
*
* @export
* @interface GetPortfolioStateResponse200
*/
interface GetPortfolioStateResponse200 {
/**
*
* @type {GetPortfolioStateResponse200Portfolio}
* @memberof GetPortfolioStateResponse200
*/
portfolio: GetPortfolioStateResponse200Portfolio;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
price: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
supply: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
platformFee: string;
/**
*
* @type {Array<GetPortfolioStateResponse200AssetsInner>}
* @memberof GetPortfolioStateResponse200
*/
assets: Array<GetPortfolioStateResponse200AssetsInner>;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
entryFee: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
exitFee: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200
*/
batcherFee: string;
}
/**
*
* @export
* @interface GetPortfolioStateResponse200AssetsInner
*/
interface GetPortfolioStateResponse200AssetsInner {
/**
*
* @type {GetPortfolioStateResponse200AssetsInnerAsset}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
asset: GetPortfolioStateResponse200AssetsInnerAsset;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
price: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
priceCreatedAt: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
priceId: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
amount: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
weightNum: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
weightDenom: string;
/**
*
* @type {number}
* @memberof GetPortfolioStateResponse200AssetsInner
*/
order: number;
}
/**
*
* @export
* @interface GetPortfolioStateResponse200AssetsInnerAsset
*/
interface GetPortfolioStateResponse200AssetsInnerAsset {
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
id: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
name: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
ticker: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
imageUrl: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
currencySymbol: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
mainnetUnit: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
mainnetFingerprint: string;
/**
*
* @type {number}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
decimals: number;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
riskScore: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200AssetsInnerAsset
*/
pairConversion: string;
}
/**
*
* @export
* @interface GetPortfolioStateResponse200Portfolio
*/
interface GetPortfolioStateResponse200Portfolio {
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
id: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
name: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
ticker: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
imageUrl: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
managerId: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
createdAt: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
policyId: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
onchainId: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
mtkUnit: string;
/**
*
* @type {string}
* @memberof GetPortfolioStateResponse200Portfolio
*/
featured: string;
}
/**
* @type GetPortfoliosResponse
* @export
*/
type GetPortfoliosResponse = Array<GetPortfoliosResponse200Inner> | ErrorResponse;
/**
*
* @export
* @interface GetPortfoliosResponse200Inner
*/
interface GetPortfoliosResponse200Inner {
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200Inner
*/
id: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200Inner
*/
name: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200Inner
*/
description: string;
/**
*
* @type {number}
* @memberof GetPortfoliosResponse200Inner
*/
price: number;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200Inner
*/
imageUrl: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200Inner
*/
ticker: string;
/**
*
* @type {GetPortfoliosResponse200InnerManager}
* @memberof GetPortfoliosResponse200Inner
*/
manager: GetPortfoliosResponse200InnerManager;
/**
*
* @type {Array<GetPortfoliosResponse200InnerAssetsInner>}
* @memberof GetPortfoliosResponse200Inner
*/
assets: Array<GetPortfoliosResponse200InnerAssetsInner>;
}
/**
*
* @export
* @interface GetPortfoliosResponse200InnerAssetsInner
*/
interface GetPortfoliosResponse200InnerAssetsInner {
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerAssetsInner
*/
hexName: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerAssetsInner
*/
policyId: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerAssetsInner
*/
ticker: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerAssetsInner
*/
imageUrl: string;
}
/**
*
* @export
* @interface GetPortfoliosResponse200InnerManager
*/
interface GetPortfoliosResponse200InnerManager {
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerManager
*/
name: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerManager
*/
address: string;
/**
*
* @type {string}
* @memberof GetPortfoliosResponse200InnerManager
*/
imageUrl: string;
/**
*
* @type {boolean}
* @memberof GetPortfoliosResponse200InnerManager
*/
verified: boolean;
}
/**
* Invalid request or insufficient funds
* @export
* @interface OrdersCreatePost400Response
*/
interface OrdersCreatePost400Response {
[key: string]: any;
/**
*
* @type {string}
* @memberof OrdersCreatePost400Response
*/
error: string;
/**
*
* @type {string}
* @memberof OrdersCreatePost400Response
*/
message: string;
}
/**
* @type OrdersCreatePostRequest
* @export
*/
type OrdersCreatePostRequest = CreateOrderDeposit | CreateOrderWithdraw;
/**
*
* @export
* @interface OrdersSubmitPostRequest
*/
interface OrdersSubmitPostRequest {
/**
*
* @type {string}
* @memberof OrdersSubmitPostRequest
*/
cbor: string;
/**
*
* @type {string}
* @memberof OrdersSubmitPostRequest
*/
id: string;
}
/**
*
* @export
* @interface PortfoliosPricePostRequest
*/
interface PortfoliosPricePostRequest {
/**
*
* @type {string}
* @memberof PortfoliosPricePostRequest
*/
portfolioId: string;
/**
*
* @type {string}
* @memberof PortfoliosPricePostRequest
*/
period: PortfoliosPricePostRequestPeriodEnum;
}
declare const PortfoliosPricePostRequestPeriodEnum: {
readonly _24h: "24h";
readonly _7d: "7d";
readonly _30d: "30d";
readonly All: "all";
};
type PortfoliosPricePostRequestPeriodEnum = (typeof PortfoliosPricePostRequestPeriodEnum)[keyof typeof PortfoliosPricePostRequestPeriodEnum];
/**
* @type SubmitOrderResponse
* @export
*/
type SubmitOrderResponse = ErrorResponse | SubmitOrderResponse200;
/**
*
* @export
* @interface SubmitOrderResponse200
*/
interface SubmitOrderResponse200 {
/**
*
* @type {string}
* @memberof SubmitOrderResponse200
*/
id: string;
}
/**
* @type SubmitSwapResponse
* @export
*/
type SubmitSwapResponse = ErrorResponse | SubmitSwapResponse200;
/**
*
* @export
* @interface SubmitSwapResponse200
*/
interface SubmitSwapResponse200 {
/**
*
* @type {string}
* @memberof SubmitSwapResponse200
*/
id: string;
}
/**
* Invalid request
* @export
* @interface SwapCreatePost400Response
*/
interface SwapCreatePost400Response {
[key: string]: any;
/**
*
* @type {string}
* @memberof SwapCreatePost400Response
*/
error: string;
/**
*
* @type {string}
* @memberof SwapCreatePost400Response
*/
message: string;
}
/**
*
* @export
* @interface SwapCreatePostRequest
*/
interface SwapCreatePostRequest {
[key: string]: any;
/**
* Portfolio ID for the swap
* @type {string}
* @memberof SwapCreatePostRequest
*/
portfolioId: string;
/**
* User Cardano address in Bech32
* @type {string}
* @memberof SwapCreatePostRequest
*/
address: string;
/**
* Total amount for the swap
* @type {string}
* @memberof SwapCreatePostRequest
*/
totalAmount: string;
/**
* User assets involved in the swap
* @type {Array<SwapCreatePostRequestUserAssetsInner>}
* @memberof SwapCreatePostRequest
*/
userAssets: Array<SwapCreatePostRequestUserAssetsInner>;
/**
* Assets to swap
* @type {Array<SwapCreatePostRequestSwapInner>}
* @memberof SwapCreatePostRequest
*/
swap: Array<SwapCreatePostRequestSwapInner>;
/**
* Maximum batcher fee for the swap
* @type {string}
* @memberof SwapCreatePostRequest
*/
maxBatcherFee: string;
/**
* Optional UTXOs for the swap
* @type {Array<SwapCreatePostRequestUtxosInner>}
* @memberof SwapCreatePostRequest
*/
utxos?: Array<SwapCreatePostRequestUtxosInner>;
}
/**
*
* @export
* @interface SwapCreatePostRequestSwapInner
*/
interface SwapCreatePostRequestSwapInner {
/**
* Asset ID to swap
* @type {string}
* @memberof SwapCreatePostRequestSwapInner
*/
id: string;
/**
* Amount to swap
* @type {string}
* @memberof SwapCreatePostRequestSwapInner
*/
amount: string;
}
/**
*
* @export
* @interface SwapCreatePostRequestUserAssetsInner
*/
interface SwapCreatePostRequestUserAssetsInner {
/**
* Asset ID
* @type {string}
* @memberof SwapCreatePostRequestUserAssetsInner
*/
id: string;
/**
* Amount of the asset
* @type {string}
* @memberof SwapCreatePostRequestUserAssetsInner
*/
amount: string;
}
/**
*
* @export
* @interface SwapCreatePostRequestUtxosInner
*/
interface SwapCreatePostRequestUtxosInner {
/**
* Transaction hash
* @type {string}
* @memberof SwapCreatePostRequestUtxosInner
*/
txHash: string;
/**
* UTXO output index
* @type {number}
* @memberof SwapCreatePostRequestUtxosInner
*/
outputIndex: number;
/**
*
* @type {SwapCreatePostRequestUtxosInnerAssets}
* @memberof SwapCreatePostRequestUtxosInner
*/
assets: SwapCreatePostRequestUtxosInnerAssets;
/**
* UTXO address
* @type {string}
* @memberof SwapCreatePostRequestUtxosInner
*/
address: string;
}
/**
* Assets in the UTXO
* @export
* @interface SwapCreatePostRequestUtxosInnerAssets
*/
interface SwapCreatePostRequestUtxosInnerAssets {
/**
* Asset ID in UTXO
* @type {string}
* @memberof SwapCreatePostRequestUtxosInnerAssets
*/
id?: string;
/**
* Amount in UTXO
* @type {string}
* @memberof SwapCreatePostRequestUtxosInnerAssets
*/
amount?: string;
}
/**
*
* @export
* @interface SwapSubmitPostRequest
*/
interface SwapSubmitPostRequest {
/**
*
* @type {string}
* @memberof SwapSubmitPostRequest
*/
cbor: string;
}
/**
* SDKApi - axios parameter creator
* @export
*/
declare const SDKApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Place a new order
* @param {OrdersCreatePostRequest} [ordersCreatePostRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersCreatePost: (ordersCreatePostRequest?: OrdersCreatePostRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Submit the placed order
* @param {OrdersSubmitPostRequest} ordersSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersSubmitPost: (ordersSubmitPostRequest: OrdersSubmitPostRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Get all portfolios data
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Get price of portfolio over certain period of time
* @param {PortfoliosPricePostRequest} portfoliosPricePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosPricePost: (portfoliosPricePostRequest: PortfoliosPricePostRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Get portfolio state by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosStateIdGet: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Creates a new swap for a given portfolio and user assets.
* @param {SwapCreatePostRequest} swapCreatePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapCreatePost: (swapCreatePostRequest: SwapCreatePostRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Submits a swap for a given portfolio and user assets.
* @param {SwapSubmitPostRequest} swapSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapSubmitPost: (swapSubmitPostRequest: SwapSubmitPostRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* SDKApi - functional programming interface
* @export
*/
declare const SDKApiFp: (configuration?: Configuration) => {
/**
* Place a new order
* @param {OrdersCreatePostRequest} [ordersCreatePostRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersCreatePost(ordersCreatePostRequest?: OrdersCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateOrderResponse>>;
/**
* Submit the placed order
* @param {OrdersSubmitPostRequest} ordersSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersSubmitPost(ordersSubmitPostRequest: OrdersSubmitPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitOrderResponse>>;
/**
* Get all portfolios data
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPortfoliosResponse>>;
/**
* Get price of portfolio over certain period of time
* @param {PortfoliosPricePostRequest} portfoliosPricePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosPricePost(portfoliosPricePostRequest: PortfoliosPricePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPortfolioPriceResponse>>;
/**
* Get portfolio state by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosStateIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPortfolioStateResponse>>;
/**
* Creates a new swap for a given portfolio and user assets.
* @param {SwapCreatePostRequest} swapCreatePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapCreatePost(swapCreatePostRequest: SwapCreatePostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSwapResponse>>;
/**
* Submits a swap for a given portfolio and user assets.
* @param {SwapSubmitPostRequest} swapSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapSubmitPost(swapSubmitPostRequest: SwapSubmitPostRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitSwapResponse>>;
};
/**
* SDKApi - factory interface
* @export
*/
declare const SDKApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Place a new order
* @param {OrdersCreatePostRequest} [ordersCreatePostRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersCreatePost(ordersCreatePostRequest?: OrdersCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateOrderResponse>;
/**
* Submit the placed order
* @param {OrdersSubmitPostRequest} ordersSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
ordersSubmitPost(ordersSubmitPostRequest: OrdersSubmitPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<SubmitOrderResponse>;
/**
* Get all portfolios data
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosGet(options?: RawAxiosRequestConfig): AxiosPromise<GetPortfoliosResponse>;
/**
* Get price of portfolio over certain period of time
* @param {PortfoliosPricePostRequest} portfoliosPricePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosPricePost(portfoliosPricePostRequest: PortfoliosPricePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetPortfolioPriceResponse>;
/**
* Get portfolio state by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
portfoliosStateIdGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise<GetPortfolioStateResponse>;
/**
* Creates a new swap for a given portfolio and user assets.
* @param {SwapCreatePostRequest} swapCreatePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapCreatePost(swapCreatePostRequest: SwapCreatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateSwapResponse>;
/**
* Submits a swap for a given portfolio and user assets.
* @param {SwapSubmitPostRequest} swapSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
swapSubmitPost(swapSubmitPostRequest: SwapSubmitPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<SubmitSwapResponse>;
};
/**
* SDKApi - object-oriented interface
* @export
* @class SDKApi
* @extends {BaseAPI}
*/
declare class SDKApi extends BaseAPI {
/**
* Place a new order
* @param {OrdersCreatePostRequest} [ordersCreatePostRequest]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
ordersCreatePost(ordersCreatePostRequest?: OrdersCreatePostRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<CreateOrderResponse, any>>;
/**
* Submit the placed order
* @param {OrdersSubmitPostRequest} ordersSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
ordersSubmitPost(ordersSubmitPostRequest: OrdersSubmitPostRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<SubmitOrderResponse, any>>;
/**
* Get all portfolios data
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
portfoliosGet(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<GetPortfoliosResponse, any>>;
/**
* Get price of portfolio over certain period of time
* @param {PortfoliosPricePostRequest} portfoliosPricePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
portfoliosPricePost(portfoliosPricePostRequest: PortfoliosPricePostRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<GetPortfolioPriceResponse, any>>;
/**
* Get portfolio state by id
* @param {string} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
portfoliosStateIdGet(id: string, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<GetPortfolioStateResponse, any>>;
/**
* Creates a new swap for a given portfolio and user assets.
* @param {SwapCreatePostRequest} swapCreatePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
swapCreatePost(swapCreatePostRequest: SwapCreatePostRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<CreateSwapResponse, any>>;
/**
* Submits a swap for a given portfolio and user assets.
* @param {SwapSubmitPostRequest} swapSubmitPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SDKApi
*/
swapSubmitPost(swapSubmitPostRequest: SwapSubmitPostRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<SubmitSwapResponse, any>>;
}
/**
* Metera API
* API swagger documentation of sdk
*
* 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.
*/
type index_Configuration = Configuration;
declare const index_Configuration: typeof Configuration;
type index_ConfigurationParameters = ConfigurationParameters;
type index_CreateOrderDeposit = CreateOrderDeposit;
type index_CreateOrderDepositTokensInner = CreateOrderDepositTokensInner;
type index_CreateOrderResponse = CreateOrderResponse;
type index_CreateOrderResponse200 = CreateOrderResponse200;
type index_CreateOrderWithdraw = CreateOrderWithdraw;
type index_CreateSwapResponse = CreateSwapResponse;
type index_CreateSwapResponse200 = CreateSwapResponse200;
type index_ErrorResponse = ErrorResponse;
type index_GetPortfolioPriceResponse = GetPortfolioPriceResponse;
type index_GetPortfolioPriceResponse200Inner = GetPortfolioPriceResponse200Inner;
type index_GetPortfolioStateResponse = GetPortfolioStateResponse;
type index_GetPortfolioStateResponse200 = GetPortfolioStateResponse200;
type index_GetPortfolioStateResponse200AssetsInner = GetPortfolioStateResponse200AssetsInner;
type index_GetPortfolioStateResponse200AssetsInnerAsset = GetPortfolioStateResponse200AssetsInnerAsset;
type index_GetPortfolioStateResponse200Portfolio = GetPortfolioStateResponse200Portfolio;
type index_GetPortfoliosResponse = GetPortfoliosResponse;
type index_GetPortfoliosResponse200Inner = GetPortfoliosResponse200Inner;
type index_GetPortfoliosResponse200InnerAssetsInner = GetPortfoliosResponse200InnerAssetsInner;
type index_GetPortfoliosResponse200InnerManager = GetPortfoliosResponse200InnerManager;
type index_OrdersCreatePost400Response = OrdersCreatePost400Response;
type index_OrdersCreatePostRequest = OrdersCreatePostRequest;
type index_OrdersSubmitPostRequest = OrdersSubmitPostRequest;
type index_PortfoliosPricePostRequest = PortfoliosPricePostRequest;
type index_PortfoliosPricePostRequestPeriodEnum = PortfoliosPricePostRequestPeriodEnum;
type index_SDKApi = SDKApi;
declare const index_SDKApi: typeof SDKApi;
declare const index_SDKApiAxiosParamCreator: typeof SDKApiAxiosParamCreator;
declare const index_SDKApiFactory: typeof SDKApiFactory;
declare const index_SDKApiFp: typeof SDKApiFp;
type index_SubmitOrderResponse = SubmitOrderResponse;
type index_SubmitOrderResponse200 = SubmitOrderResponse200;
type index_SubmitSwapResponse = SubmitSwapResponse;
type index_SubmitSwapResponse200 = SubmitSwapResponse200;
type index_SwapCreatePost400Response = SwapCreatePost400Response;
type index_SwapCreatePostRequest = SwapCreatePostRequest;
type index_SwapCreatePostRequestSwapInner = SwapCreatePostRequestSwapInner;
type index_SwapCreatePostRequestUserAssetsInner = SwapCreatePostRequestUserAssetsInner;
type index_SwapCreatePostRequestUtxosInner = SwapCreatePostRequestUtxosInner;
type index_SwapCreatePostRequestUtxosInnerAssets = SwapCreatePostRequestUtxosInnerAssets;
type index_SwapSubmitPostRequest = SwapSubmitPostRequest;
declare namespace index {
export { index_Configuration as Configuration, type index_ConfigurationParameters as ConfigurationParameters, type index_CreateOrderDeposit as CreateOrderDeposit, type index_CreateOrderDepositTokensInner as CreateOrderDepositTokensInner, type index_CreateOrderResponse as CreateOrderResponse, type index_CreateOrderResponse200 as CreateOrderResponse200, type index_CreateOrderWithdraw as CreateOrderWithdraw, type index_CreateSwapResponse as CreateSwapResponse, type index_CreateSwapResponse200 as CreateSwapResponse200, type index_ErrorResponse as ErrorResponse, type index_GetPortfolioPriceResponse as GetPortfolioPriceResponse, type index_GetPortfolioPriceResponse200Inner as GetPortfolioPriceResponse200Inner, type index_GetPortfolioStateResponse as GetPortfolioStateResponse, type index_GetPortfolioStateResponse200 as GetPortfolioStateResponse200, type index_GetPortfolioStateResponse200AssetsInner as GetPortfolioStateResponse200AssetsInner, type index_GetPortfolioStateResponse200AssetsInnerAsset as GetPortfolioStateResponse200AssetsInnerAsset, type index_GetPortfolioStateResponse200Portfolio as GetPortfolioStateResponse200Portfolio, type index_GetPortfoliosResponse as GetPortfoliosResponse, type index_GetPortfoliosResponse200Inner as GetPortfoliosResponse200Inner, type index_GetPortfoliosResponse200InnerAssetsInner as GetPortfoliosResponse200InnerAssetsInner, type index_GetPortfoliosResponse200InnerManager as GetPortfoliosResponse200InnerManager, type index_OrdersCreatePost400Response as OrdersCreatePost400Response, type index_OrdersCreatePostRequest as OrdersCreatePostRequest, type index_OrdersSubmitPostRequest as OrdersSubmitPostRequest, type index_PortfoliosPricePostRequest as PortfoliosPricePostRequest, type index_PortfoliosPricePostRequestPeriodEnum as PortfoliosPricePostRequestPeriodEnum, index_SDKApi as SDKApi, index_SDKApiAxiosParamCreator as SDKApiAxiosParamCreator, index_SDKApiFactory as SDKApiFactory, index_SDKApiFp as SDKApiFp, type index_SubmitOrderResponse as SubmitOrderResponse, type index_SubmitOrderResponse200 as SubmitOrderResponse200, type index_SubmitSwapResponse as SubmitSwapResponse, type index_SubmitSwapResponse200 as SubmitSwapResponse200, type index_SwapCreatePost400Response as SwapCreatePost400Response, type index_SwapCreatePostRequest as SwapCreatePostRequest, type index_SwapCreatePostRequestSwapInner as SwapCreatePostRequestSwapInner, type index_SwapCreatePostRequestUserAssetsInner as SwapCreatePostRequestUserAssetsInner, type index_SwapCreatePostRequestUtxosInner as SwapCreatePostRequestUtxosInner, type index_SwapCreatePostRequestUtxosInnerAssets as SwapCreatePostRequestUtxosInnerAssets, type index_SwapSubmitPostRequest as SwapSubmitPostRequest };
}
export { Configuration, type ConfigurationParameters, type CreateOrderDeposit, type CreateOrderDepositTokensInner, type CreateOrderResponse, type CreateOrderResponse200, type CreateOrderWithdraw, type CreateSwapResponse, type CreateSwapResponse200, type ErrorResponse, type GetPortfolioPriceResponse, type GetPortfolioPriceResponse200Inner, type GetPortfolioStateResponse, type GetPortfolioStateResponse200, type GetPortfolioStateResponse200AssetsInner, type GetPortfolioStateResponse200AssetsInnerAsset, type GetPortfolioStateResponse200Portfolio, type GetPortfoliosResponse, type GetPortfoliosResponse200Inner, type GetPortfoliosResponse200InnerAssetsInner, type GetPortfoliosResponse200InnerManager, type OrdersCreatePost400Response, type OrdersCreatePostRequest, type OrdersSubmitPostRequest, type PortfoliosPricePostRequest, PortfoliosPricePostRequestPeriodEnum, SDKApi, SDKApiAxiosParamCreator, SDKApiFactory, SDKApiFp, type SubmitOrderResponse, type SubmitOrderResponse200, type SubmitSwapResponse, type SubmitSwapResponse200, type SwapCreatePost400Response, type SwapCreatePostRequest, type SwapCreatePostRequestSwapInner, type SwapCreatePostRequestUserAssetsInner, type SwapCreatePostRequestUtxosInner, type SwapCreatePostRequestUtxosInnerAssets, type SwapSubmitPostRequest, index as api };