Commodity Futures Quantified Table -- Contract code

Author: The Little Dream, Created: 2018-02-22 13:57:40, Updated: 2021-09-24 14:54:04

Contract code

Contract code First-hand guarantee (procedure is roughly calculated) Product name Notes
c1805 884.5 Corn, 1805
cs1805 1033 Corn starch 1805
RM805 1170.5 Dishes in May
TA805 1351.5 PTA in May
m1805 1418 Beans and peas 1805
FG805 1481 Glass in May
b1805 1653 Beans two, 1805
v1805 1686.25 Polyethylene 1805
SF805 1793.5 Cast iron in May
a1805 1807.5 Yellow soybean number 1,805
SM805 1918 May is coming
MA805 2060.1000000000004 Methanol in May
bu1805 2072 bu1805 The Asphalt
rb1805 2302.2 rb1805 Screw steel
hc1805 2319 hc1805 Coiled foil
WH805 2605 Hard wheat May
p1805 2666 Palm oil 1805
pp1805 2749.5 Polypropylene 1805
l1805 2866.5 Polyethylene 1805
y1805 2951 Bean oil 1805
SR805 3034.5 White sugar 805
ZC805 3048 Coal in May
jd1805 3049.6 Eggs in 1805
LR805 3087 The Nightingale of May
OI805 3343 May beans
i1805 3489.5000000000005 Iron ore 1805
al1805 3620 al1805 Oh, my God.
CF805 3773.75 Cotton in May
jm1805 3858 Coke coal 1805 Coal
ag1805 4447.2 ag1805 Silver
pb1805 4762.5 pb1805 Oh, my God.
sn1805 6960 sn1805 Tin
ni1805 7172 ni1805 Oh, my God.
zn1805 7494 zn1805 Oh, my God.
j1805 10405 Copper coke 1805
ru1805 11368 ru1805 Oh, my God.
cu1805 21044 cu1805 Copper

Code of the leverage agreement

This is a video of the incident.

How to bid: coupon code coupon + coupon A contract & coupon B contract Leverage order price = Contract price A Leverage contract price B ((A contract price is less than B contract is negative bai number) In the case of the SP m1809 & m1901 contract, the SP m1809 & m1901 contract is sold at the same time as the SP m1809 & m1901 contract. SPC y 1809 & p 1809 represent the same quantity of sales and purchases as the SPC y 1809 & p 1809 contract. SPC y 1809 & p 1809 represent the same quantity of sales and purchases as the SPC y 1809 & p 1809 contract. For example, the trader's declaration instruction to buy 2 hands SP m1809 & m1901, with a limit price of 100 yuan, means that the price of the first contract must be lower than the price of the next contract of 100 yuan to be settled. The following final transaction returns are all eligible: the first contract to buy 2 hands, with a transaction price of 3715 yuan, the second contract to sell 2 hands, with a transaction price of 3815 yuan, with a difference of 100 yuan. Similarly, if the broker uses the SPD swap to represent a long-term leverage transaction, if he orders to buy the SPD CF809 & CF901 swap, he will buy the CF809 swap and sell the CF901 swap; if he sells the SPD CF809 & CF901 swap, he will sell the CF809 swap and buy the CF901 swap. If the IPS is used to represent a cross-variety swap, the buy IPS SF809 & SM809 is the same as the buy SF809 & SM809 is the same as the buy SM809 is the same as the buy SM809 is the same as the buy SM809 is the same as the buy SF809 & SM809 is the same as the buy SM809 is the same as the buy SM809 is the same as the buy SF809 is the same as the buy SM809.

Query through interface

Other people who only know the name of the product, can use the following code to query, for example, red dates, do not know how much his code is, but know the name called red dates.

function main(){
    var productsForFind = null
    while(true){
        if(exchange.IO("status")){         
            LogStatus(_D(), "已经连接CTP !")     
            exchange.IO("products").forEach(function(product) {
                Log(product)
                if (product.ProductName == "红枣") {    // 这里设置 要查的 名字。
                    Log(product, "#FF0000")
                    productsForFind = product
                }
            })
            break
        } else {
            LogStatus(_D(), "未连接CTP !")
        }
        Sleep(1000)
    }
    
    Log(productsForFind, "##FF0000")
}

The search results:

{
	"ProductClass": 49,
	"VolumeMultiple": 5,
	"PriceTick": 5,
	"MaxLimitOrderVolume": 1000,
	"MaxMarketOrderVolume": 200,
	"MinLimitOrderVolume": 1,
	"CloseDealType": 49,
	"MinMarketOrderVolume": 1,
	"ExchangeProductID": "",
	"UnderlyingMultiple": 1,
	"PositionDateType": 50,
	"TradeCurrencyID": "CNY",
	"MortgageFundUseRange": 48,
	"ProductID": "CJ",
	"ProductName": "红枣",
	"ExchangeID": "CZCE",
	"PositionType": 50
}

The product ID attribute value is the contract code.

Option to query

function main(){
    var productsForFind = null
    while(true){
        if(exchange.IO("status")){         
            LogStatus(_D(), "已经连接CTP !")     
            var ret = exchange.IO("instruments")
            ret.forEach(function(product) {
                // Log(product)
                // 这里设置要查的名字,i铁矿石合约,或者IO合约
                if (product.InstrumentName.indexOf("i") != -1 && (product.InstrumentName.indexOf("P") != -1 || product.InstrumentName.indexOf("C") != -1)) { 
                    Log(product, "#FF0000")
                    productsForFind = product
                }
            })
            break
        } else {
            LogStatus(_D(), "未连接CTP !")
        }
        Sleep(1000)
    }
    
    Log(productsForFind, "#FF0000")
}

img


More

lwc87I'm using FMZ from Shenzhen, but I can't find the FMZ standard rate code, do you want to bother asking if FMZ supports standard rates?

The Little DreamRe-testing does not support a leverage contract, or see if the time frame is a mismatch.

lwc87I got a list of contracts through the IO function at boot time, but when entering the contract code at retrieval, it shows that the subscription contract failed, for example contract SPD TA104&TA110, what is the reason for this?

The Little DreamYes, these functional interface retrievals are not supported, as the data is provided by the live exchange, so it can only be accessed at live time, and only at opening time to connect to the futures company's server.

lwc87Teacher, look at the documentation that says this function has to run on a real disk, I don't understand, is it at the start of the disk, or does it have to run in the robot?

The Little DreamAre you referring to leveraged contracts? All contracts can be searched. What's up? exchange.IO (("instruments"); What's up? https://www.fmz.com/api#io%E5%87%BD%E6%95%B0%EF%BC%88%E5%95%86%E5%93%81%E6%9C%9F%E8%B4%A7%E6%89%A9%E5%B1%95%EF%BC%89