import APP from '@/services';
import { WrMarketTradeConfig } from '../go/wrtrade/interface';

export function getRules(): WrMarketTradeConfig[] {
    return APP.get('rules')
}

/**
 * 根据市场ID查询交易参数配置
 */
export function getRulesByMarketid(marketid: number) {
    const rules = getRules();
    return rules.find((e) => e.marketid === marketid);
}