Files
n8n-nodes-strike/nodes/Strike/descriptions/RatesDescription.ts
Martien 4ee845e6cd Fix Rates getTicker endpoint - resolve 404 error
The Strike API /rates/ticker endpoint returns all currency pairs in a single response, not individual pairs. Updated the implementation to:

- Remove incorrect currency pair parameter from endpoint URL
- Fetch all tickers and filter to requested pair client-side
- Add "All Currency Pairs" option to get all rates at once
- Add BTC/AUD and BTC/USDT currency pair options
- Improve error handling when requested pair not found

Fixes 404 "Resource not found" error when using Rates > Get Ticker operation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 17:16:30 +01:00

52 lines
1.2 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
export const ratesOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['rates'],
},
},
options: [
{
name: 'Get Ticker',
value: 'getTicker',
description: 'Get current exchange rates',
action: 'Get exchange rates',
},
],
default: 'getTicker',
},
];
export const ratesFields: INodeProperties[] = [
// ----------------------------------
// rates:getTicker
// ----------------------------------
{
displayName: 'Currency Pair',
name: 'currencyPair',
type: 'options',
options: [
{ name: 'All Currency Pairs', value: 'all' },
{ name: 'BTC/USD', value: 'BTCUSD' },
{ name: 'BTC/EUR', value: 'BTCEUR' },
{ name: 'BTC/GBP', value: 'BTCGBP' },
{ name: 'BTC/AUD', value: 'BTCAUD' },
{ name: 'BTC/USDT', value: 'BTCUSDT' },
],
default: 'BTCUSD',
description: 'Currency pair for the ticker. Select "All Currency Pairs" to get rates for all available pairs.',
displayOptions: {
show: {
resource: ['rates'],
operation: ['getTicker'],
},
},
},
];