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

StrikePrice

Strike Price on a Call and Put futures contracts

decimal number
FuturesContractDeliveryDates

List of delivery dates for the contract

Collection of ClsFuturesContractDeliveryDateAdd
FuturesContractComments

List of comments for the contract

Collection of ClsFuturesContractCommentAdd

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",
  "StrikePrice": 15.1,
  "FuturesContractDeliveryDates": [
    {
      "DeliveryDate": "sample string 1",
      "DeliveryAmount": 2.1
    },
    {
      "DeliveryDate": "sample string 1",
      "DeliveryAmount": 2.1
    }
  ],
  "FuturesContractComments": [
    {
      "Comment": "sample string 1"
    },
    {
      "Comment": "sample string 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>
  <FuturesContractComments>
    <ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractCommentAdd>
      <Comment>sample string 1</Comment>
    </ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractCommentAdd>
    <ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractCommentAdd>
      <Comment>sample string 1</Comment>
    </ClsFuturesContract.ClsFuturesContractAdd.ClsFuturesContractCommentAdd>
  </FuturesContractComments>
  <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>
  <StrikePrice>15.1</StrikePrice>
  <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",
      "CommodityID": "sample string 3",
      "ExchangeID": "sample string 4",
      "DateEstablished": "sample string 5",
      "CommodityUnits": 6.1,
      "DeliveryDate": "sample string 7",
      "ContractPrice": 8.1,
      "ContractType": "sample string 10",
      "ContractStatus": "sample string 11",
      "FuturesMonthID": "sample string 12",
      "Basisprice": 13.1,
      "VendorID": "sample string 14",
      "FuturesPrice": 15.1,
      "UnitsPerContract": 16.1,
      "PricingNotes": "sample string 17",
      "BidCriteria": "sample string 18",
      "DTNContractID": 19,
      "ExternalContractId": "sample string 20",
      "FuturesContractDeliveryDates": [
        {
          "DeliveryDate": "sample string 4",
          "DeliveryAmount": 5.1
        },
        {
          "DeliveryDate": "sample string 4",
          "DeliveryAmount": 5.1
        }
      ],
      "FuturesContractComments": [
        {
          "contract": "sample string 1",
          "Location": "sample string 2",
          "LineItem": 3,
          "commdate": "sample string 4",
          "comment": "sample string 5"
        },
        {
          "contract": "sample string 1",
          "Location": "sample string 2",
          "LineItem": 3,
          "commdate": "sample string 4",
          "comment": "sample string 5"
        }
      ]
    },
    {
      "ContractID": "sample string 1",
      "LocationID": "sample string 2",
      "CommodityID": "sample string 3",
      "ExchangeID": "sample string 4",
      "DateEstablished": "sample string 5",
      "CommodityUnits": 6.1,
      "DeliveryDate": "sample string 7",
      "ContractPrice": 8.1,
      "ContractType": "sample string 10",
      "ContractStatus": "sample string 11",
      "FuturesMonthID": "sample string 12",
      "Basisprice": 13.1,
      "VendorID": "sample string 14",
      "FuturesPrice": 15.1,
      "UnitsPerContract": 16.1,
      "PricingNotes": "sample string 17",
      "BidCriteria": "sample string 18",
      "DTNContractID": 19,
      "ExternalContractId": "sample string 20",
      "FuturesContractDeliveryDates": [
        {
          "DeliveryDate": "sample string 4",
          "DeliveryAmount": 5.1
        },
        {
          "DeliveryDate": "sample string 4",
          "DeliveryAmount": 5.1
        }
      ],
      "FuturesContractComments": [
        {
          "contract": "sample string 1",
          "Location": "sample string 2",
          "LineItem": 3,
          "commdate": "sample string 4",
          "comment": "sample string 5"
        },
        {
          "contract": "sample string 1",
          "Location": "sample string 2",
          "LineItem": 3,
          "commdate": "sample string 4",
          "comment": "sample string 5"
        }
      ]
    }
  ]
}

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:Basisprice>13.1</d2p1:Basisprice>
      <d2p1:BidCriteria>sample string 18</d2p1:BidCriteria>
      <d2p1:CommodityID>sample string 3</d2p1:CommodityID>
      <d2p1:CommodityUnits>6.1</d2p1:CommodityUnits>
      <d2p1:ContractID>sample string 1</d2p1:ContractID>
      <d2p1:ContractPrice>8.1</d2p1:ContractPrice>
      <d2p1:ContractStatus>sample string 11</d2p1:ContractStatus>
      <d2p1:ContractType>sample string 10</d2p1:ContractType>
      <d2p1:DTNContractID>19</d2p1:DTNContractID>
      <d2p1:DateEstablished>sample string 5</d2p1:DateEstablished>
      <d2p1:DeliveryDate>sample string 7</d2p1:DeliveryDate>
      <d2p1:ExchangeID>sample string 4</d2p1:ExchangeID>
      <d2p1:ExternalContractId>sample string 20</d2p1:ExternalContractId>
      <d2p1:FuturesContractComments>
        <d2p1:ClsFuturesContract.ClsFuturesContractComment>
          <d2p1:LineItem>3</d2p1:LineItem>
          <d2p1:Location>sample string 2</d2p1:Location>
          <d2p1:commdate>sample string 4</d2p1:commdate>
          <d2p1:comment>sample string 5</d2p1:comment>
          <d2p1:contract>sample string 1</d2p1:contract>
        </d2p1:ClsFuturesContract.ClsFuturesContractComment>
        <d2p1:ClsFuturesContract.ClsFuturesContractComment>
          <d2p1:LineItem>3</d2p1:LineItem>
          <d2p1:Location>sample string 2</d2p1:Location>
          <d2p1:commdate>sample string 4</d2p1:commdate>
          <d2p1:comment>sample string 5</d2p1:comment>
          <d2p1:contract>sample string 1</d2p1:contract>
        </d2p1:ClsFuturesContract.ClsFuturesContractComment>
      </d2p1:FuturesContractComments>
      <d2p1:FuturesContractDeliveryDates>
        <d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
          <d2p1:DeliveryAmount>5.1</d2p1:DeliveryAmount>
          <d2p1:DeliveryDate>sample string 4</d2p1:DeliveryDate>
        </d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
        <d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
          <d2p1:DeliveryAmount>5.1</d2p1:DeliveryAmount>
          <d2p1:DeliveryDate>sample string 4</d2p1:DeliveryDate>
        </d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
      </d2p1:FuturesContractDeliveryDates>
      <d2p1:FuturesMonthID>sample string 12</d2p1:FuturesMonthID>
      <d2p1:FuturesPrice>15.1</d2p1:FuturesPrice>
      <d2p1:LocationID>sample string 2</d2p1:LocationID>
      <d2p1:PricingNotes>sample string 17</d2p1:PricingNotes>
      <d2p1:UnitsPerContract>16.1</d2p1:UnitsPerContract>
      <d2p1:VendorID>sample string 14</d2p1:VendorID>
    </d2p1:ClsFuturesContract>
    <d2p1:ClsFuturesContract>
      <d2p1:Basisprice>13.1</d2p1:Basisprice>
      <d2p1:BidCriteria>sample string 18</d2p1:BidCriteria>
      <d2p1:CommodityID>sample string 3</d2p1:CommodityID>
      <d2p1:CommodityUnits>6.1</d2p1:CommodityUnits>
      <d2p1:ContractID>sample string 1</d2p1:ContractID>
      <d2p1:ContractPrice>8.1</d2p1:ContractPrice>
      <d2p1:ContractStatus>sample string 11</d2p1:ContractStatus>
      <d2p1:ContractType>sample string 10</d2p1:ContractType>
      <d2p1:DTNContractID>19</d2p1:DTNContractID>
      <d2p1:DateEstablished>sample string 5</d2p1:DateEstablished>
      <d2p1:DeliveryDate>sample string 7</d2p1:DeliveryDate>
      <d2p1:ExchangeID>sample string 4</d2p1:ExchangeID>
      <d2p1:ExternalContractId>sample string 20</d2p1:ExternalContractId>
      <d2p1:FuturesContractComments>
        <d2p1:ClsFuturesContract.ClsFuturesContractComment>
          <d2p1:LineItem>3</d2p1:LineItem>
          <d2p1:Location>sample string 2</d2p1:Location>
          <d2p1:commdate>sample string 4</d2p1:commdate>
          <d2p1:comment>sample string 5</d2p1:comment>
          <d2p1:contract>sample string 1</d2p1:contract>
        </d2p1:ClsFuturesContract.ClsFuturesContractComment>
        <d2p1:ClsFuturesContract.ClsFuturesContractComment>
          <d2p1:LineItem>3</d2p1:LineItem>
          <d2p1:Location>sample string 2</d2p1:Location>
          <d2p1:commdate>sample string 4</d2p1:commdate>
          <d2p1:comment>sample string 5</d2p1:comment>
          <d2p1:contract>sample string 1</d2p1:contract>
        </d2p1:ClsFuturesContract.ClsFuturesContractComment>
      </d2p1:FuturesContractComments>
      <d2p1:FuturesContractDeliveryDates>
        <d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
          <d2p1:DeliveryAmount>5.1</d2p1:DeliveryAmount>
          <d2p1:DeliveryDate>sample string 4</d2p1:DeliveryDate>
        </d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
        <d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
          <d2p1:DeliveryAmount>5.1</d2p1:DeliveryAmount>
          <d2p1:DeliveryDate>sample string 4</d2p1:DeliveryDate>
        </d2p1:ClsFuturesContract.ClsFuturesContractDeliveryDate>
      </d2p1:FuturesContractDeliveryDates>
      <d2p1:FuturesMonthID>sample string 12</d2p1:FuturesMonthID>
      <d2p1:FuturesPrice>15.1</d2p1:FuturesPrice>
      <d2p1:LocationID>sample string 2</d2p1:LocationID>
      <d2p1:PricingNotes>sample string 17</d2p1:PricingNotes>
      <d2p1:UnitsPerContract>16.1</d2p1:UnitsPerContract>
      <d2p1:VendorID>sample string 14</d2p1:VendorID>
    </d2p1:ClsFuturesContract>
  </FuturesContracts>
  <Message>sample string 2</Message>
  <Status>sample string 1</Status>
</AgvFuturesContract>