6.0.42 • Published 5 months ago

@jup-ag/api v6.0.42

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

JavaScript API Client for Jupiter V6

Table of Contents

Installation

To use the Jupiter API client, you need to have Node.js and npm (Node Package Manager) installed. Then, you can install the package using npm:

npm install @jup-ag/api

Developing

  • pnpm dev-quote
    • Get request a quote based on mints and amount
  • pnpm dev-swap

    • Post request with the quote response to receive the swap transaction to sign and send to the network
    • Ensure you have setup process.env.PRIVATE_KEY to sign
  • Please set up process.env.API_KEY if you have a Pro plan via https://portal.jup.ag/

Refer to our developer documentation for more information and tips:

Usage

To start using the API client, you need to require it in your Node.js project:

import { createJupiterApiClient } from '@jup-ag/api';

const jupiterQuoteApi = createJupiterApiClient(config); // config is optional such as api key

Now, you can call methods provided by the API client to interact with Jupiter's API. For example:

jupiterQuoteApi.quoteGet({
    inputMint: "So11111111111111111111111111111111111111112",
    outputMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    amount: "100000000",
    slippageBps: 100,
})

Examples

Checkout the example in the repo.

6.0.41

6 months ago

6.0.40

8 months ago

6.0.42

5 months ago

6.0.38

9 months ago

6.0.37

9 months ago

6.0.36

9 months ago

6.0.35

9 months ago

6.0.39

8 months ago

6.0.30

12 months ago

6.0.34

9 months ago

6.0.33

9 months ago

6.0.32

10 months ago

6.0.31

10 months ago

6.0.29

1 year ago

6.0.28

1 year ago

6.0.27

1 year ago

6.0.26

1 year ago

6.0.25

1 year ago

6.0.24

1 year ago

6.0.23

1 year ago

6.0.27-alpha

1 year ago

6.0.22

1 year ago

6.0.21

1 year ago

6.0.20

1 year ago

6.0.20-test

2 years ago

6.0.19

2 years ago

6.0.18

2 years ago

6.0.17

2 years ago

6.0.16

2 years ago

6.0.15

2 years ago

6.0.14

2 years ago

6.0.13

2 years ago

6.0.12

2 years ago

6.0.11

2 years ago

6.0.10

2 years ago

6.0.9-test.0

2 years ago

6.0.9

2 years ago

6.0.8

2 years ago

6.0.7

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.5

2 years ago

6.0.4

2 years ago

6.0.6

2 years ago

3.0.4-alpha.0

3 years ago

4.0.0

3 years ago

4.0.1-alpha.0

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago