Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Basic authentication using the partner API keys from https://console.grainfinance.co/keys

Path Parameters

customerId
string<uuid>
required

The id of the customer within the Grain platform.

Pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}
hedgeId
string<uuid>
required

The id of the hedge within the Grain platform.

Pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}

Body

application/json

Information required by Grain in order to generate an extension proposal.

endAt
string<YYYY-MM-DD>
required

The requested new due date of the hedge, denoted in YYYY-MM-DD format. Must be later than the hedge's current due date and no later than today plus the partner's maximum tenor.

Pattern: \d{4}-\d{2}-\d{2}
Example:

"2023-04-24"

Response

Extension Proposal Created

An extension proposal returned by the extension-quote call.

id
string<uuid>
required

The id of this extension proposal, to be passed to the extension-accept call.

Pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}
Example:

"6f1c2a3e-8a4b-4f0e-9b7d-2c5e1f3a9d42"

fromCurrency
string
required

The currency in which the transaction should be paid at by your customer.

Example:

"MXN"

toCurrency
string
required

The currency in which the inventory item is listed at on your platform.

Example:

"USD"

fromCurrencyAmount
number<double>
required

The hedge's amount in the fromCurrency at the new rate. Unchanged when the fromCurrency is the fixed side.

Example:

32426.94

toCurrencyAmount
number<double>
required

The hedge's amount in the toCurrency at the new rate. Unchanged when the toCurrency is the fixed side.

Example:

1560

quote
number<double>
required

The new rate of the hedge after the extension.

Example:

20.7865

endAt
string<YYYY-MM-DD>
required

The new due date of the hedge, denoted in YYYY-MM-DD format.

Pattern: \d{4}-\d{2}-\d{2}
Example:

"2023-04-24"

settlementAt
string<YYYY-MM-DD>
required

The new settlement date of the hedge (next business day after endAt), denoted in YYYY-MM-DD format.

Pattern: \d{4}-\d{2}-\d{2}
Example:

"2023-04-25"

validUntilTs
number<double>
required

The unix timestamp until which this extension proposal is valid.

Example:

1676889000

beforeHedgeState
object
required

The hedge's state immediately before this extension.

afterHedgeState
object
required

The hedge's state immediately after this extension.