User operations
Create a batch operation
You can create a batch operation including transfers and swaps.
x-api-key<token>
In: header
walletAddressstring
The wallet address (in hexadecimal format) initiating the opearation.
Match
^0x[a-fA-F0-9]{40}$
chainIdnumber
The blockchain network where the operation originates. Supported chains:
- Arbitrum One: 42161
- Avalanche: 43114
- Base: 8453
- BNB Smart Chain: 56
- Ethereum: 1
- OP Mainnet: 10
- Polygon: 137
- Gnosis: 100
operationsarray<object | object>
Response Body
curl -X POST "https://api.notus.team/api/v1/crypto/batch-operations" \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
}'
const body = JSON.stringify({
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
})
fetch("https://api.notus.team/api/v1/crypto/batch-operations", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.notus.team/api/v1/crypto/batch-operations"
body := strings.NewReader(`{
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.notus.team/api/v1/crypto/batch-operations"
body = {
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.notus.team/api/v1/crypto/batch-operations"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"walletAddress": "0xa2acc967a9fc4fd5d18351d06deb9b8718c18333",
"chainId": 42161,
"operations": [
{
"type": "transfer",
"params": {
"amount": "101.25",
"gasFeePaymentMethod": "ADD_TO_AMOUNT",
"payGasFeeToken": "string",
"token": "string",
"toAddress": "string"
}
}
]
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://api.notus.team/api/v1/crypto/batch-operations", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
"quoteId": "string",
"userOperationHash": "string",
"expiresAt": "2025-10-26T13:27:49.542Z",
"operations": [
{
"swap": {
"metadata": {
"key": "value"
},
"quoteId": "string",
"userOperationHash": "string",
"walletAddress": "string",
"tokenIn": "string",
"amountIn": "string",
"tokenOut": "string",
"chainIn": 0,
"chainOut": 0,
"minAmountOut": "string",
"estimatedGasFees": {
"payGasFeeToken": "string",
"maxGasFeeToken": "string",
"gasFeeTokenAmount": "string",
"gasFeeTokenAmountUSD": "string",
"maxGasFeeNative": "string"
},
"estimatedCollectedFee": {
"collectedFeeToken": "string",
"collectedFee": "string",
"collectedFeePercent": "string",
"notusCollectedFee": "string",
"notusCollectedFeePercent": "string"
},
"amountInUSD": "string",
"amountOutUSD": "string",
"tokenInPrice": "string",
"swapProvider": "PARASWAP",
"expiresAt": 0
}
}
]
}
{
"statusCode": 400,
"id": "NOT_AUTHORIZED_TOKENS",
"message": "The tokens '[0x]' are not authorized yet."
}
{
"statusCode": 404,
"id": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT",
"message": "The requested wallet \"undefined\" is not registered with the project"
}
{
"statusCode": 500,
"id": "SWAP_QUOTE",
"message": "Failed to get a swap quote. Please try again later"
}