Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 53 additions & 45 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,51 +213,59 @@
},
{
"group": "JUPITER",
"openapi": "./openapi/jupiter.json"
},
{
"group": "RAYDIUM",
"openapi": "./openapi/raydium.json"
},
{
"group": "SAVE",
"openapi": "./openapi/save.json"
},
{
"group": "DEFITUNA",
"openapi": "./openapi/defituna.json"
},
{
"group": "DEFICARROT",
"openapi": "./openapi/deficarrot.json"
},
{
"group": "DRIFT",
"openapi": "./openapi/drift.json"
},
{
"group": "KAMINO",
"openapi": "./openapi/kamino.json"
},
{
"group": "LULO",
"openapi": "./openapi/lulo.json"
},
{
"group": "MARGINFI",
"openapi": "./openapi/marginfi.json"
},
{
"group": "METEORA",
"openapi": "./openapi/meteora.json"
},
{
"group": "ORCA",
"openapi": "./openapi/orca.json"
},
{
"group": "SOLANA",
"openapi": "./openapi/solana.json"
"icon": "https://jup.ag/favicon.ico",
"pages": [
"standard-blinks-library/jupiter/index",
"standard-blinks-library/jupiter/swap",
{
"group": "Lend",
"pages": [
"standard-blinks-library/jupiter/lend",
"standard-blinks-library/jupiter/earn",
"standard-blinks-library/jupiter/borrow"
]
},
{
"group": "API Reference",
"openapi": "./openapi/jupiter.json",
"pages": [
{
"group": "Swap",
"pages": [
"GET /api/v0/swap/{tokenPair}",
"POST /api/v0/swap/{tokenPair}/{amount}"
]
},
{
"group": "Lend",
"pages": [
{
"group": "Earn",
"pages": [
"GET /api/v0/lend/earn/{vaultToken}/deposit",
"POST /api/v0/lend/earn/{vaultToken}/deposit",
"GET /api/v0/lend/earn/{vaultToken}/withdraw",
"POST /api/v0/lend/earn/{vaultToken}/withdraw"
]
},
{
"group": "Borrow",
"pages": [
"GET /api/v0/lend/borrow/{vaultId}/deposit",
"POST /api/v0/lend/borrow/{vaultId}/deposit",
"GET /api/v0/lend/borrow/{vaultId}/{positionId}/borrow",
"POST /api/v0/lend/borrow/{vaultId}/{positionId}/borrow",
"GET /api/v0/lend/borrow/{vaultId}/{positionId}/repay",
"POST /api/v0/lend/borrow/{vaultId}/{positionId}/repay",
"GET /api/v0/lend/borrow/{vaultId}/{positionId}/withdraw",
"POST /api/v0/lend/borrow/{vaultId}/{positionId}/withdraw"
]
}
]
}
]
}
]
}
]
},
Expand Down
65 changes: 55 additions & 10 deletions standard-blinks-library/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,75 @@ sidebarTitle: "Introduction"
description: "Production-ready APIs to construct transactions for Solana's top protocols. Instantly bring on-chain experiences into your app today."
---

<img src="https://res.cloudinary.com/dnxjhra4h/image/upload/f_auto,q_auto/v1750961824/dialect-docs/standard-blinks-library-landing.png" alt="Standard Blinks Library - Ready-to-use protocol endpoints" />
<img
src="https://res.cloudinary.com/dnxjhra4h/image/upload/f_auto,q_auto/v1750961824/dialect-docs/standard-blinks-library-landing.png"
alt="Standard Blinks Library - Ready-to-use protocol endpoints"
/>

The Standard Blinks Library (SBL) provides production-ready APIs for creating transactions with Solana's most popular protocols. Instead of building integrations from scratch or learning complex protocol SDKs, use our tested endpoints to bring DeFi experiences into your app with simple HTTP requests.


## Supported Protocols

We support major protocols like Jupiter, Kamino, Raydium, Orca, Meteora, and more. For the complete list of available integrations, visit our [Supported Protocols](/markets/supported-protocols) page or browse protocols in the left sidebar menu.

<Tip>
Don't see what you're looking for? New protocols are added regularly—[request an integration](https://form.typeform.com/to/aLMntdWJ) and we'll help you get started.
Don't see what you're looking for? New protocols are added regularly—[request
an integration](https://form.typeform.com/to/aLMntdWJ) and we'll help you get
started.
</Tip>


## Get Started

<CardGroup cols={3}>
<Card title="Why SBL?" icon="lightbulb" href="/standard-blinks-library/why-sbl">
<CardGroup cols={2}>
<Card
title="Why SBL?"
icon="lightbulb"
href="/standard-blinks-library/why-sbl"
>
Learn why teams are choosing APIs over SDKs for protocol integrations
</Card>
<Card title="Quick Start" icon="rocket" href="/standard-blinks-library/quick-start">
<Card
title="Quick Start"
icon="rocket"
href="/standard-blinks-library/quick-start"
>
Build your first integration in 5 minutes with zero SDK complexity
</Card>
<Card title="Browse Protocols" icon="grid" href="/api-reference/swap/swap-token">
Explore ready-to-use APIs for swaps, lending, liquidity, and more
</CardGroup>

## Browse Protocols

<CardGroup cols={2}>
<Card
title="Jupiter"
icon="https://jup.ag/favicon.ico"
href="/standard-blinks-library/jupiter"
>
Jupiter is a decentralized exchange on Solana that allows you to swap
tokens, provide liquidity, and earn fees.
</Card>
<Card
title="Kamino"
icon="https://kamino.com/favicon.ico"
href="/standard-blinks-library/kamino"
>
Kamino is a lending protocol on Solana that allows you to lend and borrow
tokens.
</Card>
<Card
title="Raydium"
icon="https://raydium.io/favicon.ico"
href="/standard-blinks-library/raydium"
>
Raydium is a decentralized exchange on Solana that allows you to swap
tokens, provide liquidity, and earn fees.
</Card>
<Card
title="Orca"
icon="https://orca.so/favicon.ico"
href="/standard-blinks-library/orca"
>
Orca is a decentralized exchange on Solana that allows you to swap tokens,
provide liquidity, and earn fees.
</Card>
</CardGroup>
</CardGroup>
7 changes: 7 additions & 0 deletions standard-blinks-library/jupiter/borrow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Lend Borrow"
description: "Use your assets as collateral to take out loans with Jupiter Lend."
sidebarTitle: "Borrow"
---

TODO TODO TODO
159 changes: 159 additions & 0 deletions standard-blinks-library/jupiter/earn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
title: "Lend Earn"
description: "Earn passive income with your assets using Jupiter Lend."
sidebarTitle: "Earn"
---

Our APIs give you the full picture of the Jupiter Lend market. It starts with reading the market rates, over depositing assets, tracking your positions, and withdrawing your assets.

## Reading Data

<img
src="https://res.cloudinary.com/dnxjhra4h/image/upload/v1763754892/jupiter-lend-earn-position_ghnecy.png"
alt="Jupiter Lend Earn Action"
/>

<Note>
Please be aware that the `pk_demo` key is for testing purposes only! Request
your production API key by [getting in touch with
us](https://form.typeform.com/to/aLMntdWJ).
</Note>

### Market Info

To fetch the latest market rates, you can use our Markets API with the `jupiter` provider:

<CodeGroup>

```bash curl
curl -X GET "https://markets.dial.to/api/v0/markets?type=yield&provider=jupiter" \
-H "x-dialect-api-key: pk_demo"
```

```typescript TypeScript
const response = await fetch(
" --url 'https://markets.dial.to/api/v0/markets?type=yield&provider=jupiter' \
",
{
headers: {
"x-dialect-api-key": "pk_demo",
},
}
);
```

</CodeGroup>

For more information on how to use the market data, please see the [Understanding Market Data](/markets/quick-start#understanding-market-data) guide.

### Positions

To track your Jupiter Earn positions, use the Markets API. The response includes positions from all protocols, so you'll need to filter for Jupiter yield positions.

<CodeGroup>

```bash curl
curl --request GET \
--url 'https://markets.dial.to/api/v0/positions/owners?walletAddresses=6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176' \
--header 'x-dialect-api-key: pk_demo'
```

```typescript TypeScript
const response = await fetch(
"https://markets.dial.to/api/v0/positions/owners?walletAddresses=6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
{
method: "GET",
headers: {
"x-dialect-api-key": "pk_demo",
},
}
);

// Filter for Jupiter yield positions
const data = await response.json();
const jupiterEarnPositions = data.positions.filter(
(pos) => pos.type === "yield" && pos.market.provider.id === "jupiter"
);
```

</CodeGroup>

<Check>
Please note that we offer a second endoint that would allow you to track
**historical position data**, so that you can see how your positions have
changed over time. For more information, please see the [Historical Position
Data](/markets/history) guide.
</Check>

## Actions

Depending on the market type you will be able to take various actions. The Markets and Positions APIs will return you the blink URLs for each available action, but you can also look in the API reference section below.

<img
src="https://res.cloudinary.com/dnxjhra4h/image/upload/v1763754041/jupiter-lend-earn-action_wau67k.png"
alt="Jupiter Lend Earn Action"
/>

### Deposit Assets

To deposit assets, you can use our [Deposit API](/api-reference/lend-earn/deposit) that will return you a ready-to-sign transaction.

<CodeGroup>

```bash curl
curl --request POST \
--url 'https://jupiter.dial.to/api/v0/lend/earn/USDC/deposit?percentage=10' \
--header 'Content-Type: application/json' \
--data '{
"account": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176"
}'
```

```typescript TypeScript
const response = await fetch(
"https://jupiter.dial.to/api/v0/lend/earn/USDC/deposit?percentage=10",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
account: "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
}),
}
);
```

</CodeGroup>

### Withdraw Assets

To withdraw assets, you can use our [Withdraw API](/api-reference/lend-earn/withdraw) endpoint.

<CodeGroup>

```bash curl
curl --request POST \
--url 'https://jupiter.dial.to/api/v0/lend/earn/USDC/withdraw?percentage=10' \
--header 'Content-Type: application/json' \
--data '{
"account": "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176"
}'
```

```typescript TypeScript
const response = await fetch(
"https://jupiter.dial.to/api/v0/lend/earn/USDC/withdraw?percentage=10",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
account: "6JpNV6DK88auwzKVizdeT4Bw3D44sam5GqjcPCJ7y176",
}),
}
);
```

</CodeGroup>
28 changes: 28 additions & 0 deletions standard-blinks-library/jupiter/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "Introduction to Jupiter"
description: "Learn how to integrate Jupiter in seconds in your application and build amazing experiences for your users."
sidebarTitle: "Introduction"
mode: "wide"
---

<img
src="https://res.cloudinary.com/dnxjhra4h/image/upload/v1763748588/jupiter-intro-sbl_e8ylim.png"
alt="Jupiter SBL Introduction Landing Page"
/>

Jupiter is Solana's largest decentralized exchange (DEX) aggregator. It allows you to swap tokens, provide liquidity, and earn fees. With the SBL, you can integrate Jupiter in your application in seconds using only simple HTTP requests.

## Supported Actions

<CardGroup cols={2}>
<Card title="Swap" icon="swap" href="/standard-blinks-library/jupiter/swap">
Swap any token pair on Jupiter.
</Card>
<Card
title="Lend"
icon="chart-line"
href="/standard-blinks-library/jupiter/lend"
>
Earn yields and borrow tokens.
</Card>
</CardGroup>
Loading