n8n-nodes-base
Version:
Base nodes of n8n
73 lines (69 loc) • 2.1 kB
text/typescript
/**
* CoinGecko Node - Version 1
* Discriminator: resource=coin, operation=price
*/
/** Get the current price of any cryptocurrencies in any other supported currencies that you need */
export type CoinGeckoV1CoinPriceParams = {
resource: 'coin';
operation: 'price';
/**
* Search by coin ID or contract address
* @default coinId
*/
searchBy?: 'coinId' | 'contractAddress' | Expression<string>;
/**
* The first currency in the pair. For BTC:ETH this is BTC. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @displayOptions.show { searchBy: ["coinId"] }
* @default []
*/
baseCurrencies?: string[];
/**
* The ID of the platform issuing tokens
* @displayOptions.show { searchBy: ["contractAddress"] }
* @default ethereum
*/
platformId?: 'ethereum' | Expression<string>;
/**
* The contract address of tokens, comma-separated
* @displayOptions.show { searchBy: ["contractAddress"] }
*/
contractAddresses?: string | Expression<string> | PlaceholderValue;
/**
* The second currency in the pair. For BTC:ETH this is ETH. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
quoteCurrencies?: string[];
/**
* Options
* @default {}
*/
options?: {
/** Include 24hr Change
* @default false
*/
include_24hr_change?: boolean | Expression<boolean>;
/** Include 24hr Vol
* @default false
*/
include_24hr_vol?: boolean | Expression<boolean>;
/** Include Last Updated At
* @default false
*/
include_last_updated_at?: boolean | Expression<boolean>;
/** Include Market Cap
* @default false
*/
include_market_cap?: boolean | Expression<boolean>;
};
};
export type CoinGeckoV1CoinPriceOutput = {
'nacho-the-kat'?: {
usd: number;
};
};
export type CoinGeckoV1CoinPriceNode = {
type: 'n8n-nodes-base.coinGecko';
version: 1;
config: NodeConfig<CoinGeckoV1CoinPriceParams>;
output?: Items<CoinGeckoV1CoinPriceOutput>;
};