# Getting tokens

First, create and initialise your associated token account, and your openorders account:

```
const authorityPCTokenAccount = await spl.getAssociatedTokenAddress(  
      new anchor.web3.PublicKey(pcMint),
        connectedPublicKey,
        false,
      );
    
      console.log(authorityPCTokenAccount.toString());
      let openOrdersPda;
      let openOrdersPdaBump;
      [openOrdersPda, openOrdersPdaBump] =
      await anchor.web3.PublicKey.findProgramAddress(
        [
          Buffer.from('open-orders', 'utf-8'),
          new anchor.web3.PublicKey(marketPda).toBuffer(),
          connectedPublicKey.toBuffer(),
        ],
        program.programId,
      );
```

Next, ask the admin to mint some spl tokens to your accounts. Alternatively, if you're testing on your own deployment, you can use the adapted code in branch 'wallet-admin' to give yourself airdrops of SPL tokens&#x20;

```

const custom = new anchor.web3.PublicKey("42Dg1Y97EQuwAfj4ovzD76myhRE5ZJkCySuTzHoRcxxH");

const custom_ata_coin = new anchor.web3.PublicKey("H2cZK8LEgqEBUL52Px6fkTWMVAHrhVPi5VWwztRmRw6u");

const custom_ata_pc = new anchor.web3.PublicKey("54EjXUWQitej4UZYYbb4QNJLN1nAFmwW7AkuC19UGQoV");
    

    console.log("sent to");
    console.log(custom_ata_pc.toString());

    await createAssociatedTokenAccount(
      provider,
      pcMint,
      custom_ata_pc,
      custom,
    );

    await mintTo(
      provider,
      pcMint,
      custom_ata_coin,
      BigInt('10000000000'),
    );
    
      await createAssociatedTokenAccount(
      provider,
      pcMint,
      custom_ata_pc,
      custom,
    );
    
    await mintTo(
      provider,
      coinMint,
      customCoinTokenAccount,
      BigInt('100000000000'),
    ); 
    console.log("airdrop done");
```

That's it! You're all set up. Head on over to the Fermi DEX UI at <https://www.fermilabs.xyz/> and start trading!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fermi-dex.gitbook.io/fermi-dex-docs/fermi-dex-usage-guide/getting-set-up/getting-tokens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
