You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Grvt returning [AuthenticationError] grvt signIn() failed to receive auth-cookie or account-id when providing privateKey #30896
use ccxt_pro::Grvt;#[tokio::main]asyncfnmain(){letmut grvt = Grvt::with_config(
ccxt::Config::default().private_key("0x[my_private_key]").sandbox(true),);
grvt.load_markets(false).await;}
When I run the above code, I get the following error:
[panicked at] ccxt-base-4.5.87/src/exchanges/grvt.rs:4670:17:
[AuthenticationError] grvt signIn() failed to receive auth-cookie or account-id
In place of [my_private_key], I am supplying my L1 Ethereum address (I attempted using both a MetaMask address and a Privy address; neither worked). I have registered my wallet in Grvt using the Grvt frontend in both sandbox (testnet) and the mainnet. Removing .sandbox(true) does not fix the issue. Changing from ccxt_pro to ccxt does not fix the issue.
Thanks for the detailed report and the verbose log. It points at the cause. Your verbose output shows the wallet login succeeded: 200, {"funding_account_address": …}. The error comes from the client side, and it is specific to the Rust port (the code you posted is Rust, even though the issue form says JavaScript).
GRVT returns the session in the response headers (Set-Cookie and X-Grvt-Account-Id), and grvt.handleErrors reads them from there. On current master, the Rust build loses them in two places:
Response headers are never passed in. In rust/ccxt-common/src/exchange.rsfetch_typed, DerivedExchange::handle_errors(...) is called with Value::Null in the response-headers slot. resp.headers() is never read before resp.text(). So safe_string2(headers, "Set-Cookie", …) is always null.
The values would not be kept anyway. In the generated rust/ccxt-base/src/exchanges/grvt.rs (around lines 4663–4672), handle_errors takes &self and writes AuthAccountId / AuthCookieValue into self.options.clone(). That is a copy, so the write is discarded, and the next check sees null and panics with exactly your message.
The JS/Python/PHP builds pass the real response headers, so this path should work there. To unblock yourself now, use one of those languages with the same credentials.
One thing to check on your side: privateKey must be the wallet's private key (hex, 0x…), not its address. The issue says you put your L1 address in that slot. If so, the login is signed by a different, derived address, so it won't be your registered wallet even once the Rust issue is fixed.
The Rust fix needs to (a) capture the response headers in fetch_typed and pass them to handle_errors, and (b) give the Rust grvt sign-in path a way to keep the cookie and account id (mutable options state). That is a change to the Rust runtime and transpiler, not a one-line exchange fix, so I've labelled this as a bug for the maintainers.
Activity
carlotestor commentedon Oct 16, 2026
Thanks for the detailed report and the verbose log. It points at the cause. Your verbose output shows the wallet login succeeded:
200,{"funding_account_address": …}. The error comes from the client side, and it is specific to the Rust port (the code you posted is Rust, even though the issue form says JavaScript).GRVT returns the session in the response headers (
Set-CookieandX-Grvt-Account-Id), andgrvt.handleErrorsreads them from there. On current master, the Rust build loses them in two places:rust/ccxt-common/src/exchange.rsfetch_typed,DerivedExchange::handle_errors(...)is called withValue::Nullin the response-headers slot.resp.headers()is never read beforeresp.text(). Sosafe_string2(headers, "Set-Cookie", …)is alwaysnull.rust/ccxt-base/src/exchanges/grvt.rs(around lines 4663–4672),handle_errorstakes&selfand writesAuthAccountId/AuthCookieValueintoself.options.clone(). That is a copy, so the write is discarded, and the next check seesnulland panics with exactly your message.The JS/Python/PHP builds pass the real response headers, so this path should work there. To unblock yourself now, use one of those languages with the same credentials.
One thing to check on your side:
privateKeymust be the wallet's private key (hex,0x…), not its address. The issue says you put your L1 address in that slot. If so, the login is signed by a different, derived address, so it won't be your registered wallet even once the Rust issue is fixed.The Rust fix needs to (a) capture the response headers in
fetch_typedand pass them tohandle_errors, and (b) give the Rustgrvtsign-in path a way to keep the cookie and account id (mutable options state). That is a change to the Rust runtime and transpiler, not a one-line exchange fix, so I've labelled this as a bug for the maintainers.ErwinSchweiz12 commentedon Oct 16, 2026
Yes, sorry. I meant to say my L1 private key not L1 address. I did supply my L1 private key and it did not work.
carlosmiei commentedon Oct 20, 2026
@ErwinSchweiz12 We will take a look and get back to you. thanks for reporting it
carlosmiei commentedon Oct 20, 2026
@ErwinSchweiz12 Will be fixed here #30941