tlab-trading-toolkit
Version:
A trading toolkit for building advanced trading bots on the GDAX platform
33 lines (32 loc) • 2.5 kB
TypeScript
/***************************************************************************************************************************
* @license *
* Copyright 2017 Coinbase, Inc. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
* with the License. You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on *
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the *
* License for the specific language governing permissions and limitations under the License. *
***************************************************************************************************************************/
import { Product } from '../PublicExchangeAPI';
import { Logger } from '../../utils/Logger';
export declare const POLONIEX_WS_FEED = "wss://api2.poloniex.com";
export declare const POLONIEX_API_URL = "https://poloniex.com/public";
/**
* Takes a Poloniex product name an 'GDAXifies' it, but replacing '_' with '-' and swapping the quote and base symbols
* @param poloProduct
*/
export declare function getGenericProduct(poloProduct: string): Product;
export interface PoloniexProduct extends Product {
poloniexId: number;
poloniexSymbol: string;
isFrozen: boolean;
}
export interface PoloniexProducts {
[id: number]: PoloniexProduct;
}
export declare function getProductInfo(id: number, refresh: boolean, logger?: Logger): Promise<PoloniexProduct>;
export declare function getAllProductInfo(refresh: boolean, logger?: Logger): Promise<PoloniexProducts>;