Skip to main content
POST
/
notify-deposit
Notify NEAR deposit
curl --request POST \
  --url https://api.leokit.dev/notify-deposit \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "txHash": "0xa1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890",
  "depositAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
'
{
  "success": true,
  "status": "received",
  "correlationId": "abc123",
  "message": "Deposit notification sent to NEAR"
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

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

Overview

The notify-deposit endpoint notifies the NEAR 1Click API about a completed deposit transaction. This allows NEAR to preemptively verify the deposit, speeding up swap processing.
This endpoint is specifically for NEAR protocol swaps. It’s optional but recommended for faster swap execution.

Endpoint

POST /leokit/notify-deposit

Request

Headers

HeaderValue
Content-Typeapplication/json
Api-KeyYour API key

Body

{
  "txHash": "0x1234567890abcdef...",
  "depositAddress": "0xabcdef1234567890..."
}

Parameters

ParameterTypeRequiredDescription
txHashstringYesTransaction hash of the deposit (must start with 0x)
depositAddressstringYesDeposit address provided in the quote (must start with 0x)

Response

Success (200)

{
  "success": true,
  "status": "submitted",
  "correlationId": "abc123-def456",
  "message": "Deposit notification sent to NEAR"
}
FieldDescription
successWhether the notification was accepted
statusStatus from NEAR 1Click API
correlationIdTracking ID from NEAR
messageHuman-readable status message

Error Responses

Missing or invalid parameters:
{
  "error": "Missing required fields: txHash, depositAddress"
}
Or invalid format:
{
  "error": "Invalid format: txHash and depositAddress must be hex strings starting with 0x"
}

Example

curl -X POST https://api.leokit.dev/leokit/notify-deposit \
  -H "Content-Type: application/json" \
  -H "Api-Key: your_api_key" \
  -d '{
    "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "depositAddress": "0xabcdef1234567890abcdef1234567890abcdef12"
  }'

When to Use

Call this endpoint after broadcasting a deposit transaction for a NEAR-routed swap:
1

Get Quote

Request a quote with NEAR as the destination or intermediary
2

Generate Deposit

Call /leokit/deposit to get the deposit address and transaction
3

Sign & Broadcast

Sign and broadcast the transaction to the source chain
4

Notify Deposit

Call this endpoint with the transaction hash and deposit address
5

Track Status

Monitor the swap via /leokit/status

Notes

  • This endpoint forwards requests to NEAR’s 1Click API at https://1click.chaindefuser.com/v0/deposit/submit
  • The timeout for NEAR API calls is 10 seconds
  • Notification is optional but can significantly speed up swap processing
  • Only applicable for swaps routed through the NEAR protocol

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Body

application/json

Request body for /notify-deposit. Used to notify NEAR 1Click API about completed deposits.

txHash
string
required

Transaction hash (hex string starting with 0x).

depositAddress
string
required

Deposit address from NEAR aggregator quote (hex string starting with 0x).

Response

Deposit notification sent successfully

Response from /notify-deposit on success.

success
boolean
required
message
string
required
status
string

Status from NEAR 1Click API.

correlationId
string

Correlation ID from NEAR 1Click API.