import { apiClient } from './client'

export interface ExchangeResponse {
  id: number
  name: string
  enabled: boolean
}

export const exchangesApi = {
  listExchanges: async (): Promise<ExchangeResponse[]> => {
    const response = await apiClient.get('/api/exchanges/')
    return response.data
  },

  getExchange: async (exchangeId: number): Promise<ExchangeResponse> => {
    const response = await apiClient.get(`/api/exchanges/${exchangeId}`)
    return response.data
  },
}
