UNPKG

1.59 kBTypeScriptView Raw
1/**
2 * Markets Object
3 * BitGo accessor to Bitcoin market data.
4 *
5 * Copyright 2019, BitGo, Inc. All Rights Reserved.
6 *
7 * @prettier
8 */
9import * as Bluebird from 'bluebird';
10import { BitGo } from '../bitgo';
11import { BaseCoin } from './baseCoin';
12import { NodeCallback } from './types';
13export declare type LatestOptions = any;
14export declare type YesterdayOptions = any;
15export interface LastDaysOptions {
16 currencyName: string;
17 days?: string;
18}
19export declare class Markets {
20 private readonly bitgo;
21 private readonly baseCoin;
22 constructor(bitgo: BitGo, baseCoin: BaseCoin);
23 /**
24 * Get the latest price data
25 * @param params {}
26 * @param callback
27 * @returns {*} an object containing price and volume data from the
28 * current day in a number of currencies
29 **/
30 latest(params: LatestOptions, callback: NodeCallback<any>): Bluebird<any>;
31 /**
32 * Get yesterday's price data
33 * @param params {}
34 * @param callback
35 * @returns {*} an object containing price and volume data from the
36 * previous day in a number of currencies
37 */
38 yesterday(params: YesterdayOptions, callback: NodeCallback<any>): Bluebird<any>;
39 /**
40 * Get price data from up to 90 days prior to today
41 * @param params { currencyName: the code for the desired currency, for example USD }
42 * @param callback
43 * @returns {*} an object containing average prices from a number of previous days
44 */
45 lastDays(params: LastDaysOptions, callback: NodeCallback<any>): Bluebird<any>;
46}
47//# sourceMappingURL=markets.d.ts.map
\No newline at end of file