Setting up the API

How to set up the API in a dev environment.

Requirements

  • NodeJS 20.X (others may work, not tested yet)

  • A 0x API key

  • An Alchemy API key

If you intend to alter/redeploy the contracts:

  • An Etherscan key

  • Private key for a wallet with enough funds to deploy contracts

Usage

This project can be run locally for deployment

Initial setup

npm install
cp .env.example .env

Open the .env file and set up the environment variables.

Running API locally

cd api
npm run start

Running tests

cd core
npm run test

Using a different RPC provider

Adjust the getProvider method if you wish to use a different RPC provider.

Last updated