Skip to main content
POST
/
circle-gateway
/
v2
/
depositAddresses
Create a quoted Circle Gateway deposit vault
curl --request POST \
  --url https://api.eco.com/circle-gateway/v2/depositAddresses \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceChainId": 8453,
  "amount": "1000000",
  "recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "depositor": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "refundRecipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}
'
import requests

url = "https://api.eco.com/circle-gateway/v2/depositAddresses"

payload = {
"sourceChainId": 8453,
"amount": "1000000",
"recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"depositor": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"refundRecipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sourceChainId: 8453,
amount: '1000000',
recipient: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
depositor: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
refundRecipient: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
})
};

fetch('https://api.eco.com/circle-gateway/v2/depositAddresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eco.com/circle-gateway/v2/depositAddresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceChainId' => 8453,
'amount' => '1000000',
'recipient' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'depositor' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'refundRecipient' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.eco.com/circle-gateway/v2/depositAddresses"

payload := strings.NewReader("{\n \"sourceChainId\": 8453,\n \"amount\": \"1000000\",\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"depositor\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"refundRecipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.eco.com/circle-gateway/v2/depositAddresses")
.header("Content-Type", "application/json")
.body("{\n \"sourceChainId\": 8453,\n \"amount\": \"1000000\",\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"depositor\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"refundRecipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eco.com/circle-gateway/v2/depositAddresses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceChainId\": 8453,\n \"amount\": \"1000000\",\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"depositor\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"refundRecipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "vaultAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "amount": "1000000",
    "deadline": 1798915200
  }
}

Body

application/json
sourceChainId
number
required

Source chain ID for the USDC transfer. Mainnet: 8453 (Base), 10 (Optimism), 42161 (Arbitrum).

Example:

8453

amount
string
required

Required positive integer source-chain USDC amount in base units.

Example:

"1000000"

recipient
string
required

Gateway depositFor target on the destination chain.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

depositor
string
required

Address that will fund the vault.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

refundRecipient
string

Address that receives expiry refunds. Defaults to depositor.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

Response

Quoted vault created successfully

data
object
required