curl --request POST \
--url https://api.grainfinance.co/v1/customers/{customerId}/hedges/{hedgeId}/drawdown/quote \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'X-Customer-IP: <x-customer-ip>' \
--data '
{
"fromCurrencyAmount": 8040.43
}
'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"fromCurrency": "MXN",
"toCurrency": "USD",
"fromCurrencyAmount": 8040.43,
"toCurrencyAmount": 390,
"collateralAmountReleased": 402.02,
"quote": 20.6165,
"endAt": "2023-01-25",
"settlementAt": "2023-01-26",
"validUntilTs": 1659625098,
"beforeHedgeState": {
"fromCurrencyAmount": 32161.8,
"toCurrencyAmount": 1560,
"quote": 20.6165,
"endAt": "2023-02-23",
"settlementAt": "2023-02-24",
"collateralAmount": 1608.09
},
"afterHedgeState": {
"fromCurrencyAmount": 24121.37,
"toCurrencyAmount": 1170,
"quote": 20.6165,
"endAt": "2023-02-23",
"settlementAt": "2023-02-24",
"collateralAmount": 1206.07
}
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Could not parse IP address (v4 or v6) for ip"
}Quote
Generates a rate proposal for drawing down part of a flexible or standard hedge. The drawdown executes today and settles on the next business day. Once accepted, this proposal becomes a confirmed drawdown.
curl --request POST \
--url https://api.grainfinance.co/v1/customers/{customerId}/hedges/{hedgeId}/drawdown/quote \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'X-Customer-IP: <x-customer-ip>' \
--data '
{
"fromCurrencyAmount": 8040.43
}
'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"fromCurrency": "MXN",
"toCurrency": "USD",
"fromCurrencyAmount": 8040.43,
"toCurrencyAmount": 390,
"collateralAmountReleased": 402.02,
"quote": 20.6165,
"endAt": "2023-01-25",
"settlementAt": "2023-01-26",
"validUntilTs": 1659625098,
"beforeHedgeState": {
"fromCurrencyAmount": 32161.8,
"toCurrencyAmount": 1560,
"quote": 20.6165,
"endAt": "2023-02-23",
"settlementAt": "2023-02-24",
"collateralAmount": 1608.09
},
"afterHedgeState": {
"fromCurrencyAmount": 24121.37,
"toCurrencyAmount": 1170,
"quote": 20.6165,
"endAt": "2023-02-23",
"settlementAt": "2023-02-24",
"collateralAmount": 1206.07
}
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Can't perform this action",
"reason": "Supplied object is in *Cancelled* state, which prevents performing this action"
}{
"message": "Could not parse IP address (v4 or v6) for ip"
}Authorizations
Basic authentication using the partner API keys from https://console.grainfinance.co/keys
Headers
Path Parameters
Body
Information required by Grain in order to generate a drawdown proposal.
The drawdown executes on the next business day, so no endAt is accepted.
Specifies the amount to draw down in the fromCurrency. Exactly one of fromCurrencyAmount or toCurrencyAmount may be provided, matching the hedge's fixed side. Must be at least 10 in the fixed side's currency and not exceed the hedge's remaining amount. A drawdown must either use the full remaining amount or leave at least 10 remaining.
8040.43
Specifies the amount to draw down in the toCurrency. Exactly one of fromCurrencyAmount or toCurrencyAmount may be provided, matching the hedge's fixed side. Must be at least 10 in the fixed side's currency and not exceed the hedge's remaining amount. A drawdown must either use the full remaining amount or leave at least 10 remaining.
390
Response
Drawdown Proposal Created
A drawdown proposal returned by the drawdown-quote call.