POST FuturesContract/PostFuturesContract

Create a futures contract

Request Information

URI Parameters

Body Parameters

ClsFuturesContractAdd
NameDescriptionTypeAdditional Information
ContractID

ID or Contract Number of the contract

string

Max length: 10

LocationID

Contract Location ID

string

Required

Max length: 6

CommodityID

Commodity ID for the contract

string

Required

Max length: 6

ExchangeID

ID of the exchange used

string

Max length: 10

DateEstablished

Date the contract was established

string

Format must be MM/dd/yyyy

CommodityUnits

Units for the contract

decimal number
DeliveryDate

Date of delivery

string
ContractType

Type of contract

FuturesContractType

Required

ContractStatus

Current status of the contract

FuturesContractStatus

Required

FuturesMonthID

ID of the futures month

string

Max length: 10

VendorID

ID of the vendor/broker

string

Max length: 10

FuturesPrice

Futures price established for the contract

decimal number
UnitsPerContract

Units on a futures contract

decimal number
ExternalContractID

Reference ID from another source to be stored with the contract

string

Max length: 50

FuturesContractDeliveryDates

List of delivery dates for the contract

Collection of ClsFuturesContractDeliveryDateAdd

Request Formats

application/json, text/json

Sample:
{
  "ContractID": "sample string 3",
  "LocationID": "sample string 4",
  "CommodityID": "sample string 5",
  "ExchangeID": "sample string 6",
  "DateEstablished": "sample string 7",
  "CommodityUnits": 8.1,
  "DeliveryDate": "sample string 9",
  "ContractType": 1,
  "ContractStatus": 1,
  "FuturesMonthID": "sample string 10",
  "VendorID": "sample string 11",
  "FuturesPrice": 12.1,
  "UnitsPerContract": 13.1,
  "ExternalContractID": "sample string 14",
  "FuturesContractDeliveryDates": [
    {
      "DeliveryDate": "sample string 1",
      "DeliveryAmount": 2.1
    },
    {
      "DeliveryDate": "sample string 1",
      "DeliveryAmount": 2.1
    }
  ]
}

application/xml, text/xml

Sample:
<ClsFuturesContract.ClsFuturesContractAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Grain">
  <CommodityID>sample string 5</CommodityID>
  <CommodityUnits>8.1</CommodityUnits>
  <ContractID>sample string 3</ContractID>
  <ContractStatus>Open</ContractStatus>
  <ContractType>FuturesBought</ContractType>
  <DateEstablished>sample string 7</DateEstablished>
  <DeliveryDate>sample string 9</DeliveryDate>
  <ExchangeID>sample string 6</ExchangeID>
  <ExternalContractID>sample string 14</ExternalContractID>
  <FuturesContractDeliveryDates>
    <ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractDeliveryDateAdd>
      <DeliveryAmount>2.1</DeliveryAmount>
      <DeliveryDate>sample string 1</DeliveryDate>
    </ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractDeliveryDateAdd>
    <ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractDeliveryDateAdd>
      <DeliveryAmount>2.1</DeliveryAmount>
      <DeliveryDate>sample string 1</DeliveryDate>
    </ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractDeliveryDateAdd>
  </FuturesContractDeliveryDates>
  <FuturesMonthID>sample string 10</FuturesMonthID>
  <FuturesPrice>12.1</FuturesPrice>
  <LocationID>sample string 4</LocationID>
  <UnitsPerContract>13.1</UnitsPerContract>
  <VendorID>sample string 11</VendorID>
</ClsFuturesContract.ClsFuturesContractAdd>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ClsFuturesContractAdd'.

Response Information

Resource Description

Create a futures contract

AgvFuturesContract
NameDescriptionTypeAdditional Information
Status

0 - Success; 1 - An error occurred; 2 - An error occurred; 3 - Descriptive message, process was successful

string
Message

Informational message that corresponds to the Status returned; 0 - Message will be "OK"; 1 - Detailed message returned to give user an indication of what went wrong; 2 - Less detailed message returned that may not mean anything to the user but that the application might use to take a corrective action; 3 - Not an error but something the user might need to know

string
Count

The number of results returned

string
FuturesContracts

Collection of ClsFuturesContract

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "Count": "2",
  "FuturesContracts": [
    {
      "ContractID": "sample string 1",
      "LocationID": "sample string 2"
    },
    {
      "ContractID": "sample string 1",
      "LocationID": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<AgvFuturesContract xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Contract.Futures">
  <FuturesContracts xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.Grain">
    <d2p1:ClsFuturesContract>
      <d2p1:ContractID>sample string 1</d2p1:ContractID>
      <d2p1:LocationID>sample string 2</d2p1:LocationID>
    </d2p1:ClsFuturesContract>
    <d2p1:ClsFuturesContract>
      <d2p1:ContractID>sample string 1</d2p1:ContractID>
      <d2p1:LocationID>sample string 2</d2p1:LocationID>
    </d2p1:ClsFuturesContract>
  </FuturesContracts>
  <Message>sample string 2</Message>
  <Status>sample string 1</Status>
</AgvFuturesContract>