Network Configuration
Faucet Funds (Testnet Only)

Faucet

Faucet is only available on testnet environments, including dydx-testnet-4.

Installation

pnpm install @dydxprotocol/v4-client-js

Getting Test Funds

import { FaucetClient } from "@dydxprotocol/v4-client-js";
 
const client = new FaucetClient(FaucetApiHost.TESTNET);
const address = /* your dYdX Chain address */;
const faucetResponse = await client?.fill(address, 0, 2000);

Getting Test Native Tokens

import { FaucetClient } from "@dydxprotocol/v4-client-js";
 
const client = new FaucetClient(FaucetApiHost.TESTNET);
const address = /* your dYdX Chain address */;
const faucetResponse = await client?.fill_native(address);