n8n-nodes-base
Version:
Base nodes of n8n
75 lines (71 loc) • 1.9 kB
text/typescript
/**
* CoinGecko Node - Version 1
* Discriminator: resource=coin, operation=ticker
*/
/** Get coin tickers */
export type CoinGeckoV1CoinTickerParams = {
resource: 'coin';
operation: 'ticker';
/**
* Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
*/
coinId?: string | Expression<string>;
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 100
*/
limit?: number | Expression<number>;
/**
* Options
* @default {}
*/
options?: {
/** Filter results by exchange IDs. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
exchange_ids?: string[];
/** Include Exchange Logo
* @default false
*/
include_exchange_logo?: boolean | Expression<boolean>;
/** Sorts results by the selected rule
* @default trust_score_desc
*/
order?: 'trust_score_desc' | 'trust_score_asc' | 'volume_desc' | Expression<string>;
};
};
export type CoinGeckoV1CoinTickerOutput = {
base?: string;
coin_id?: string;
converted_last?: {
btc?: number;
eth?: number;
};
is_anomaly?: boolean;
is_stale?: boolean;
last?: number;
last_fetch_at?: string;
last_traded_at?: string;
market?: {
has_trading_incentive?: boolean;
identifier?: string;
name?: string;
};
target?: string;
target_coin_id?: string;
timestamp?: string;
token_info_url?: null;
trade_url?: string;
};
export type CoinGeckoV1CoinTickerNode = {
type: 'n8n-nodes-base.coinGecko';
version: 1;
config: NodeConfig<CoinGeckoV1CoinTickerParams>;
output?: Items<CoinGeckoV1CoinTickerOutput>;
};