package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://deep-index.moralis.io/api/v2/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/events?chain=eth&topic=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
payload := strings.NewReader("{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\",\"internal_type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\",\"internal_type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\",\"internal_type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-API-Key", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}