Skip to main content
POST
/
automation
/
agents
/
monad
Create a Monad Agent task
curl --request POST \
  --url https://api.brewit.money/automation/agents/monad \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Monad Agent Job ",
  "repeat": 5000,
  "times": 1,
  "task": "swap",
  "payload": {
    "toToken": "0x0000000000000000000000000000000000000000",
    "fromToken": "0xf817257fed379853cDe0fa4F97AB987181B1E5Ea",
    "validatorSalt": "0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9",
    "amount": "0.1234",
    "callbackFunc": "autoSwap",
    "accountAddress": "0x67D29520c6F9579fe4B32dCbA346620846eF98d2"
  },
  "enabled": true
}
'
import requests

url = "https://api.brewit.money/automation/agents/monad"

payload = {
"name": "Monad Agent Job ",
"repeat": 5000,
"times": 1,
"task": "swap",
"payload": {
"toToken": "0x0000000000000000000000000000000000000000",
"fromToken": "0xf817257fed379853cDe0fa4F97AB987181B1E5Ea",
"validatorSalt": "0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9",
"amount": "0.1234",
"callbackFunc": "autoSwap",
"accountAddress": "0x67D29520c6F9579fe4B32dCbA346620846eF98d2"
},
"enabled": True
}
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({
name: 'Monad Agent Job ',
repeat: 5000,
times: 1,
task: 'swap',
payload: {
toToken: '0x0000000000000000000000000000000000000000',
fromToken: '0xf817257fed379853cDe0fa4F97AB987181B1E5Ea',
validatorSalt: '0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9',
amount: '0.1234',
callbackFunc: 'autoSwap',
accountAddress: '0x67D29520c6F9579fe4B32dCbA346620846eF98d2'
},
enabled: true
})
};

fetch('https://api.brewit.money/automation/agents/monad', 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.brewit.money/automation/agents/monad",
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([
'name' => 'Monad Agent Job ',
'repeat' => 5000,
'times' => 1,
'task' => 'swap',
'payload' => [
'toToken' => '0x0000000000000000000000000000000000000000',
'fromToken' => '0xf817257fed379853cDe0fa4F97AB987181B1E5Ea',
'validatorSalt' => '0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9',
'amount' => '0.1234',
'callbackFunc' => 'autoSwap',
'accountAddress' => '0x67D29520c6F9579fe4B32dCbA346620846eF98d2'
],
'enabled' => true
]),
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.brewit.money/automation/agents/monad"

payload := strings.NewReader("{\n \"name\": \"Monad Agent Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"swap\",\n \"payload\": {\n \"toToken\": \"0x0000000000000000000000000000000000000000\",\n \"fromToken\": \"0xf817257fed379853cDe0fa4F97AB987181B1E5Ea\",\n \"validatorSalt\": \"0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9\",\n \"amount\": \"0.1234\",\n \"callbackFunc\": \"autoSwap\",\n \"accountAddress\": \"0x67D29520c6F9579fe4B32dCbA346620846eF98d2\"\n },\n \"enabled\": true\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.brewit.money/automation/agents/monad")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Monad Agent Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"swap\",\n \"payload\": {\n \"toToken\": \"0x0000000000000000000000000000000000000000\",\n \"fromToken\": \"0xf817257fed379853cDe0fa4F97AB987181B1E5Ea\",\n \"validatorSalt\": \"0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9\",\n \"amount\": \"0.1234\",\n \"callbackFunc\": \"autoSwap\",\n \"accountAddress\": \"0x67D29520c6F9579fe4B32dCbA346620846eF98d2\"\n },\n \"enabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.brewit.money/automation/agents/monad")

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 \"name\": \"Monad Agent Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"swap\",\n \"payload\": {\n \"toToken\": \"0x0000000000000000000000000000000000000000\",\n \"fromToken\": \"0xf817257fed379853cDe0fa4F97AB987181B1E5Ea\",\n \"validatorSalt\": \"0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9\",\n \"amount\": \"0.1234\",\n \"callbackFunc\": \"autoSwap\",\n \"accountAddress\": \"0x67D29520c6F9579fe4B32dCbA346620846eF98d2\"\n },\n \"enabled\": true\n}"

response = http.request(request)
puts response.read_body

Body

application/json
name
string
required
repeat
integer<int32>
required
times
integer<int32>
required
task
string
required
payload
Payload · object
required
Example:
{
"toToken": "0x0000000000000000000000000000000000000000",
"fromToken": "0xf817257fed379853cDe0fa4F97AB987181B1E5Ea",
"validatorSalt": "0xde0c462c50d03af8df0bc14018a482cf470d99fb581ba4e94a52047988eed2c9",
"amount": "0.1234",
"callbackFunc": "autoSwap",
"accountAddress": "0x67D29520c6F9579fe4B32dCbA346620846eF98d2"
}
enabled
boolean
required

Response

200 - undefined