import { apiClient } from './client'; import type { Pair, ValidatePairResult } from '../types'; export const pairsApi = { getAll: async (): Promise => { const { data } = await apiClient.get('/api/pairs'); return data; }, validate: async (symbol: string): Promise => { const { data } = await apiClient.post('/api/pairs/validate', { symbol }); return data; }, add: async (symbol: string): Promise => { const { data } = await apiClient.post('/api/pairs', { symbol }); return data; }, remove: async (id: number): Promise => { await apiClient.delete(`/api/pairs/${id}`); }, toggleActive: async (id: number, _is_active?: boolean): Promise => { const { data } = await apiClient.patch(`/api/pairs/${id}/toggle`); return data; }, };