Skip to main content
cURL
curl --request POST \
  --url https://api.grainfinance.co/v1/customers/{customerId}/dual-hedges/{dualHedgeId}/cancel \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'X-Customer-IP: <x-customer-ip>' \
  --data '
{
  "reason": "Customer requested cancellation"
}
'
{
  "id": "bf77890b-17e2-48a1-9198-707df23eb127",
  "transactionId": "bf77890b-17e2-48a1-2013-707df23eb111",
  "hedgeIds": [
    "bf77890b-17e2-48a1-2013-707df23eb222",
    "bf77890b-17e2-48a1-2013-707df23eb333"
  ]
}

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

Headers

X-Customer-IP
string<IPv4>
required

The IPv4 address of the browser from which the customer contacts your platform.
example: 192.158.1.38

Pattern: ((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}

Path Parameters

customerId
string
required

The id of the customer within the Grain platform.

dualHedgeId
string
required

The id of the dual hedge within the Grain platform.

Body

application/json

The request body for cancelling a dual hedge.

reason
string

The reason for cancelling the dual hedge.

Example:

"Customer requested cancellation"

Response

Dual Hedge Cancelled

The response of cancelling a dual hedge.

id
string<uuid>
required

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

"bf77890b-17e2-48a1-9198-707df23eb127"

transactionId
string<uuid>
required

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

"bf77890b-17e2-48a1-2013-707df23eb111"

hedgeIds
string<uuid>[]
required

The ids of the individual hedges that were cancelled as part of this dual hedge.

Stringified UUIDv4. See RFC 4112

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:
[
"bf77890b-17e2-48a1-2013-707df23eb222",
"bf77890b-17e2-48a1-2013-707df23eb333"
]