Skip to main content
cURL
curl --request POST \
  --url https://api.grainfinance.co/v1/customers/{customerId}/hedges/{hedgeId}/early-settlement/quote \
  --header 'Authorization: Basic <encoded-value>'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "hedgeId": "8173b9a7-ee61-413e-b9e3-7c04b2a067c5",
  "toCurrencyAmount": 10000,
  "fromCurrencyAmount": 10825,
  "quote": 1.0825,
  "validUntilTs": 1710510600
}

Documentation Index

Fetch the complete documentation index at: https://docs.grainfinance.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

customerId
string
required

The id of the customer within the Grain platform.

hedgeId
string
required

The id of the hedge within the Grain platform.

Response

Early Settlement Proposal Created

The response when requesting an early settlement quote for a hedge.

id
string
required

The unique identifier of the early settlement proposal.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

hedgeId
string
required

The unique identifier of the hedge associated with this proposal.

Example:

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

toCurrencyAmount
number<double>
required

The amount in the target currency (toCurrency).

Example:

10000

fromCurrencyAmount
number<double>
required

The amount in the source currency (fromCurrency).

Example:

10825

quote
number<double>
required

The exchange rate quote for the early settlement.

Example:

1.0825

validUntilTs
number<double>
required

The unix timestamp until which the early settlement proposal is valid.

Example:

1710510600