Skip to main content
GET
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}
extensionId
string<uuid>
required

The id of the extension 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}

Response

Extension Retrieved

The response body when fetching a single extension.

id
string<uuid>
required

The id of the extension 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}
Example:

"b3e0d6a1-5c7f-4e2a-8d9b-1f4c6a2e7b30"

hedgeId
string<uuid>
required

The id of the hedge this extension belongs to.

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:

"8173b9a7-ee61-413e-b9e3-7c04b2a067c5"

createdAtTs
number<double>
required

The unix timestamp at which the extension was accepted and applied.

Example:

1676887200

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"

beforeHedgeState
object
required

The hedge's state immediately before this extension.

afterHedgeState
object
required

The hedge's state immediately after this extension.