Networks
Testnet
Funds

Faucet

Faucet is only available on test environments for testers to get test funds and test native tokens.

Installation

pnpm install @dydxprotocol/v4-client

Getting Test Funds

import { FaucetClient } from "@dydxprotocol/v4-client";
 
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";
 
const client = new FaucetClient(FaucetApiHost.TESTNET);
const address = /* your dYdX chain address */;
const faucetResponse = await client?.fill_native(address);