My request for arbitrum:
Moralis.EvmApi.balance.getNativeBalance
Bad request?
Am I doing something wrong?
https://arbiscan.io/txs?a=0x13b5aad975de738dee4c7c0b2793d836d62e0e45&p=19
{
chain: '0xa4b1',
address: '0x13b5aad975de738dee4c7c0b2793d836d62e0e45',
toBlock: 19612084
}
MoralisError [Moralis SDK Core Error]: [C0006] Request failed, Bad Request(400): Could not get the balance
at RequestController.makeError (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\lib\cjs\index.cjs:1206:20)
at RequestController.<anonymous> (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\lib\cjs\index.cjs:1187:38)
at step (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\lib\cjs\index.cjs:81:23)
at Object.throw (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\lib\cjs\index.cjs:62:53)
at rejected (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\lib\cjs\index.cjs:53:65)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
isMoralisError: true,
code: 'C0006',
details: {
status: 400,
response: {
status: 400,
statusText: 'Bad Request',
headers: [AxiosHeaders],
config: [Object],
request: [ClientRequest],
data: [Object]
}
},
[cause]: AxiosError: Request failed with status code 400
at settle (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\node_modules\axios\lib\core\settle.js:19:12)
at IncomingMessage.handleStreamEnd (C:\Projects\novadash\backend-2\node_modules\@moralisweb3\common-core\node_modules\axios\lib\adapters\http.js:548:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
method: 'get',
url: 'https://deep-index.moralis.io/api/v2/0x13B5aaD975DE738DeE4c7c0b2793D836d62E0e45/balance',
params: [Object],
data: undefined
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'GET /api/v2/0x13B5aaD975DE738DeE4c7c0b2793D836d62E0e45/balance?chain=0xa4b1&to_block=19612084 HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'x-moralis-platform: NodeJS SDK\r\n' +
'x-moralis-platform-version: 2.18.4\r\n' +
'x-moralis-build-target: node\r\n' +
'x-api-key: -------------------------------
'User-Agent: axios/1.3.3\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: deep-index.moralis.io\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/api/v2/0x13B5aaD975DE738DeE4c7c0b2793D836d62E0e45/balance?chain=0xa4b1&to_block=19612084',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'deep-index.moralis.io',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 400,
statusText: 'Bad Request',
headers: [AxiosHeaders],
config: [Object],
request: [ClientRequest],
data: [Object]
}
}
}