import { Market } from '@/constants/market'
import { tradeServerRequest } from '@/services/socket/trade'
import { TradeParams } from '@/services/socket/trade/interface'

/**
 * 铁合金现货预售摘牌
 */
export function spotPresaleDestingOrder(params: TradeParams<Partial<Proto.SpotPresaleDestingOrderReq>, Proto.SpotPresaleDestingOrderRsp>) {
    return tradeServerRequest('SpotPresaleDestingOrderReq', 'SpotPresaleDestingOrderRsp', params, Market.THJ);
}

/**
 * 铁合金现货预售交收确认
 */
export function spotPresaleDeliveryConfirm(params: TradeParams<Proto.SpotPresaleDeliveryConfirmReq, Proto.SpotPresaleDeliveryConfirmRsp>) {
    return tradeServerRequest('SpotPresaleDeliveryConfirmReq', 'SpotPresaleDeliveryConfirmRsp', params);
}

/**
 * 铁合金现货预售违约确认
 */
export function spotPresaleBreachOfContractConfirm(params: TradeParams<Proto.SpotPresaleBreachOfContractConfirmReq, Proto.SpotPresaleBreachOfContractConfirmRsp>) {
    return tradeServerRequest('SpotPresaleBreachOfContractConfirmReq', 'SpotPresaleBreachOfContractConfirmRsp', params);
}

/**
 * 铁合金现货预售违约申请接口请求
 */
 export function spotPresaleBreachOfContractApply(params: TradeParams<Proto.SpotPresaleBreachOfContractApplyReq, Proto.SpotPresaleBreachOfContractApplyRsp>) {
    return tradeServerRequest('SpotPresaleBreachOfContractApplyReq', 'SpotPresaleBreachOfContractApplyRsp', params);
}

/**
 * 铁合金现货预售付款处理接口请求
 */
 export function spotPresalePlayment(params: TradeParams<Proto.SpotPresalePlaymentReq, Proto.SpotPresalePlaymentRsp>) {
    return tradeServerRequest('SpotPresalePlaymentReq', 'SpotPresalePlaymentRsp', params);
}

/**
 * 挂牌撤单请求
 */
 export function wrListingCancelOrder(params: TradeParams<Proto.WRListingCancelOrderReq, Proto.WRListingCancelOrderRsp>) {
    return tradeServerRequest('WRListingCancelOrderReq', 'WRListingCancelOrderRsp', params);
}

/**
 * 仓单出库申请
 */
 export function wrOutApply(params: TradeParams<Proto.WROutApplyReq, Proto.WROutApplyRsp>) {
    return tradeServerRequest('WROutApplyReq', 'WROutApplyRsp', params);
}

/**
 * 持仓单挂牌请求
 */
 export function hdWROrder(params: TradeParams<Proto.HdWROrderReq, Proto.HdWROrderRsp>) {
    return tradeServerRequest('HdWROrderReq', 'HdWROrderRsp', params);
}

/**
 * 持仓单摘牌请求
 */
 export function hdWRDealOrder(params: TradeParams<Proto.HdWRDealOrderReq, Proto.HdWRDealOrderRsp>) {
    return tradeServerRequest('HdWRDealOrderReq', 'HdWRDealOrderRsp', params);
}

/**
 * 铁合金现货预售转让挂牌接口请求
 */
 export function spotPresaleTransferListing(params: TradeParams<Proto.SpotPresaleTransferListingReq, Proto.SpotPresaleTransferListingRsp>) {
    return tradeServerRequest('SpotPresaleTransferListingReq', 'SpotPresaleTransferListingRsp', params);
}

/**
 * 铁合金现货预售转让撤销接口请求
 */
 export function spotPresaleTransferCancel(params: TradeParams<Proto.SpotPresaleTransferCancelReq, Proto.SpotPresaleTransferCancelRsp>) {
    return tradeServerRequest('SpotPresaleTransferCancelReq', 'SpotPresaleTransferCancelRsp', params);
}

/**
 * 铁合金现货预售转让摘牌接口请求
 */
 export function spotPresaleTransferDesting(params: TradeParams<Proto.SpotPresaleTransferDestingReq, Proto.SpotPresaleTransferDestingRsp>) {
    return tradeServerRequest('SpotPresaleTransferDestingReq', 'SpotPresaleTransferDestingRsp', params);
}