Notify NEAR deposit
Endpoint Details
Notify Deposit
Notify NEAR 1Click API about completed deposits for faster swap processing
POST
Notify NEAR deposit
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
Request
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Api-Key | Your API key |
Body
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
txHash | string | Yes | Transaction hash of the deposit (must start with 0x) |
depositAddress | string | Yes | Deposit address provided in the quote (must start with 0x) |
Response
Success (200)
| Field | Description |
|---|---|
success | Whether the notification was accepted |
status | Status from NEAR 1Click API |
correlationId | Tracking ID from NEAR |
message | Human-readable status message |
Error Responses
- 400 Bad Request
- 4xx/5xx from NEAR
- 500 Internal Error
Missing or invalid parameters:Or invalid format:
Example
When to Use
Call this endpoint after broadcasting a deposit transaction for a NEAR-routed swap: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
Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4
Body
application/json