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}
drawdownId
string<uuid>
required

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

Drawdown Retrieved

The response body when fetching a single drawdown.

id
string<uuid>
required

The id of the drawdown 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:

"4d78ac65-2c3f-47e2-8bf3-3f76124e9d27"

hedgeId
string<uuid>
required

The id of the hedge this drawdown 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"

status
enum<string>
required

The status of the drawdown.

Available options:
Active,
InProcess,
Completed,
Overdue
Example:

"Active"

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 amount to draw down in the fromCurrency. If toCurrencyAmount is provided, then fromCurrencyAmount calculated as: fromCurrencyAmount = toCurrencyAmount * quote

Example:

8040.43

toCurrencyAmount
number<double>
required

The amount to draw down in the toCurrency. If fromCurrencyAmount is provided, then toCurrencyAmount calculated as: toCurrencyAmount = fromCurrencyAmount / quote

Example:

390

collateralAmountReleased
number<double>
required

The collateral amount released back to the customer as a result of this drawdown, in the fromCurrency.

Example:

402.02

quote
number<double>
required

The rate at which this drawdown settles - the rate locked by the hedge.

Example:

20.6165

endAt
string<YYYY-MM-DD>
required

The date in which this drawdown executes, denoted in YYYY-MM-DD format.

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

"2023-01-25"

settlementAt
string<YYYY-MM-DD>
required

The date in which this drawdown settles (next business day after endAt), denoted in YYYY-MM-DD format.

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

"2023-01-26"

beforeHedgeState
object
required

The hedge's state immediately before this drawdown.

afterHedgeState
object
required

The hedge's remaining state immediately after this drawdown.