How to send ETH currency with Transaction Send API

We want to send ETH with transaction:send endpoint. Add all wallets to api key and also all permissions. We can send BTC successfully. Here is the implementation.
The problem is when sending ETH the api service convert it to BTC and send the given address from BTC wallet. We want to send directly ETH from ETH wallet. Can anyone help? Where is the problem cannot figure it out.

 var timestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
  var body = jsonEncode({"type": "send", "to": email, "amount": amount, "currency": currency});
  var req = {
    'method': 'POST',
    'path': "/v2/accounts/accountId/transactions",
    'body': body,
  };

  var message = '$timestamp${req['method']}${req['path']}${req['body']}';
  var hmac = Hmac(sha256, utf8.encode(apiSecret));
  var signature = hmac.convert(utf8.encode(message)).toString();

  var headers = {
    'CB-ACCESS-SIGN': signature,
    'CB-ACCESS-TIMESTAMP': timestamp.toString(),
    'CB-ACCESS-KEY': apiKey,
    'CB-VERSION': '2022-03-14',
  };

  var baseUrl = 'https://api.coinbase.com';
  var url = Uri.parse(baseUrl + req['path'].toString());

  var response = await http.post(url, body: body, headers: headers);

  if (response.statusCode == 200 || response.statusCode == 201) {
    print(response.body);
  } else {
    print('Request failed with status: ${response.statusCode} Body: ${response.body}');
  }

Hi @ctykaya,

Thank you for using Coinbase forum, we are happy to help you.

I completely understand your concern we are working on it. we will get back to you with proper resolution. For now we don’t have ETA.

Have a good day ahead.

Santhosh

Hi @ctykaya,

Thank you for your time and patience.

To send ETH directly from an ETH wallet, you will need to make sure that the currency parameter in your request is set to ETH. Additionally, you will need to make sure that the API key and secret you are using have the wallet:transactions:send permission enabled.

Hope this helps you, have a good day.

Hi @Sandy ,

Here is our detail implementation.

var apiKey = "myapikey";
  var apiSecret = "myapisecret";

  var timestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
  var body = jsonEncode({"type": "send", "to": "mail", "amount": "0.0000001", "currency": "ETH"});
  var req = {
    'method': 'POST',
    'path': "/v2/accounts/myaccountId/transactions",
    'body': body,
  };

  var message = '$timestamp${req['method']}${req['path']}${req['body']}';
  var hmac = Hmac(sha256, utf8.encode(apiSecret));
  var signature = hmac.convert(utf8.encode(message)).toString();

  var headers = {
    'CB-ACCESS-SIGN': signature,
    'CB-ACCESS-TIMESTAMP': timestamp.toString(),
    'CB-ACCESS-KEY': apiKey,
    'CB-VERSION': '2022-03-14',
  };

  var baseUrl = 'https://api.coinbase.com';
  var url = Uri.parse(baseUrl + req['path'].toString());

  var response = await http.post(url, body: body, headers: headers);

  if (response.statusCode == 200 || response.statusCode == 201) {
    print(response.body);
  } else {
    print('Request failed with status: ${response.statusCode} Body: ${response.body}');
  }
  return response;

All permissions are enabled.
Here is the log message:

Request failed with status: 404 Body: {“errors”:[{“id”:“not_found”,“message”:“Not found”}]}