资源加载中... loading...

exchange.GetContractType

exchange.GetContractType()函数用于获取{@var/EXCHANGE exchange}交易所对象当前设置的合约代码。

exchange.GetContractType()函数返回交易所对象{@var/EXCHANGE exchange}当前设置的合约代码。 string

exchange.GetContractType()

function main () {
    // 鉴于测试代码,不使用商品期货策略一般架构,这里仅仅判断exchange.IO("status")函数,判断连接期货公司前置机成功后立即执行测试代码。股票证券无需使用exchange.IO("status")判断连接状态
    while(!exchange.IO("status")) {
        Sleep(1000)
    }

    Log(exchange.SetContractType("rb888")) 
    Log(exchange.GetContractType())
}
def main():
    while not exchange.IO("status"):
        Sleep(1000)

    Log(exchange.SetContractType("rb888"))
    Log(exchange.GetContractType())
void main() {
    while(exchange.IO("status") == 0) {
        Sleep(1000);
    }

    Log(exchange.SetContractType("rb888"));
    Log(exchange.GetContractType());
}

{@fun/Futures/exchange.SetContractType exchange.SetContractType}

exchange.SetContractType StrDecode