Skip to content

Commit

Permalink
General improvements (#248)
Browse files Browse the repository at this point in the history
* remove duplicate page

* reorganize table of contents

* reposition user guides

* standardize dYdX Chain

* modify index
  • Loading branch information
zachfc authored Aug 2, 2024
1 parent e326659 commit 8a4109a
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 99 deletions.
33 changes: 16 additions & 17 deletions pages/_meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
{
"----------INTRODUCTION----------": {
"title": "🦔 INTRODUCTION",
"title": "Introduction",
"type": "separator"
},

"index": "Introduction",
"index": "About dYdX",
"introduction-getting_started": "Getting Started",
"introduction-onboarding_faqs": "Onboarding FAQs",

"----------USERS----------": {
"title": "Chain Users",
"type": "separator"
},
"users-rewards": "Rewards",
"users-governance": "Governance",
"user-guides": "Guides",
"users-faqs": "User Submitted Questions",

"----------INFRASTRUCTURE PROVIDERS----------": {
"title": "🏘️ INFRASTRUCTURE PROVIDERS",
"title": "Chain Infrastructure",
"type": "separator"
},

Expand All @@ -18,7 +27,7 @@
"infrastructure_providers-operators": "Indexer Operators",

"----------API INTEGRATION----------": {
"title": "🔗 API INTEGRATION",
"title": "API Integrations",
"type": "separator"
},

Expand All @@ -31,31 +40,21 @@
"api_integration-constants": "Constants",
"api_integration-guides": "Guides",

"----------USERS----------": {
"title": "👥 USERS",
"type": "separator"
},

"users-rewards": "Rewards",
"users-governance": "Governance",
"user-guides": "Guides",
"users-faqs": "FAQs",

"----------CONCEPTS----------": {
"title": "🤔 CONCEPTS",
"title": "Technical Concepts",
"type": "separator"
},

"concepts-architecture": "Architecture",
"concepts-trading": "Trading",

"----------OTHER----------": {
"title": "💬 OTHER",
"title": "Policies",
"type": "separator"
},

"other-security": "Security",
"other-terms_of_use_and_privacy_policy": "Terms & Policies",
"other-terms_of_use_and_privacy_policy": "Terms of Use & Privacy",

"testnet app": {
"title": "Testnet App ↗",
Expand Down
32 changes: 16 additions & 16 deletions pages/api_integration-clients/indexer_client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ market_candles = market_candles_response.data['candles']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain
// address is the wallet address on dYdX Chain
const response = await client.account.getSubaccounts(address);
const subaccounts = response.subaccounts;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain
# address is the wallet address on dYdX Chain
subaccounts_response = client.account.get_subaccounts(address)
subaccounts = subaccounts_response.data['subaccounts']
```
Expand All @@ -314,14 +314,14 @@ subaccounts = subaccounts_response.data['subaccounts']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccount(address, subaccountNumber);
const subaccounts = response.subaccount;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
subaccount_response = client.account.get_subaccount(address, subaccount_number)
subaccount = subaccount_response.data['subaccount']
```
Expand All @@ -336,14 +336,14 @@ subaccount = subaccount_response.data['subaccount']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountAssetPositions(address, subaccountNumber);
const positions = response.positions;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
asset_positions_response = client.account.get_subaccount_asset_positions(address, subaccount_number)
asset_positions = asset_positions_response.data['positions']
```
Expand All @@ -358,14 +358,14 @@ asset_positions = asset_positions_response.data['positions']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountPerpetualPositions(address, subaccountNumber);
const positions = response.positions;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
perpetual_positions_response = client.account.get_subaccount_perpetual_positions(address, subaccount_number)
perpetual_positions = perpetual_positions_response.data['positions']
```
Expand All @@ -380,14 +380,14 @@ perpetual_positions = perpetual_positions_response.data['positions']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountOrders(address, subaccountNumber);
const orders = response;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
orders_response = client.account.get_subaccount_orders(address, subaccount_number)
orders = orders_response.data
```
Expand Down Expand Up @@ -424,14 +424,14 @@ order = order_response.data
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountFills(address, subaccountNumber);
const fills = response.fills;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
fills_response = client.account.get_subaccount_fills(address, subaccount_number)
fills = fills_response.data['fills']
```
Expand All @@ -447,14 +447,14 @@ fills = fills_response.data['fills']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountTransfers(address, subaccountNumber);
const transfers = response.transfers;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
transfers_response = client.account.get_subaccount_transfers(address, subaccount_number)
transfers = transfers_response.data['transfers']
```
Expand All @@ -469,14 +469,14 @@ transfers = transfers_response.data['transfers']
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccountNumber is the subaccount number
// address is the wallet address on dYdX Chain, subaccountNumber is the subaccount number
const response = await client.account.getSubaccountHistoricalPNLs(address, subaccountNumber);
const historicalPnl = response.historicalPnl;
```
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
historical_pnl_response = client.account.get_subaccount_historical_pnls(address, subaccount_number)
historical_pnl = historical_pnl_response.data['historicalPnl']
```
Expand Down
4 changes: 2 additions & 2 deletions pages/api_integration-clients/socket_client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ws.unsubscribe_from_candles(ticker, resolution)
<Tabs items={["TypeScript", "Python"]}>
<Tab>
```typescript copy
// address is the wallet address on dYdX chain, subaccount_number is the subaccount number
// address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
// subscribe
// updates are not batched, received in channel_data
mySocket.subscribeToSubaccount(ticker, resolution);
Expand All @@ -230,7 +230,7 @@ mySocket.unsubscribeFromSubaccount(ticker, resolution)
</Tab>
<Tab>
```python copy
# address is the wallet address on dYdX chain, subaccount_number is the subaccount number
# address is the wallet address on dYdX Chain, subaccount_number is the subaccount number
# subscribe
# updates are not batched, received in channel_data
ws.subscribe_to_subaccount(ticker, resolution)
Expand Down
32 changes: 0 additions & 32 deletions pages/getting_started/depositing_and_user_journeys.md

This file was deleted.

13 changes: 7 additions & 6 deletions pages/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Introduction

Welcome to the dYdX Chain documentation hub! This is the source of truth for documentation related to v4 software (the dYdX Chain”). 🦔 💜
Welcome to the dYdX Chain documentation! This is the source of truth for information about the dYdX Chain.

## About dYdX
> The terms "dYdX Chain" and "dYdX v4 software" are synonymous. They both refer to the same product, called the dYdX Chain in this documentation.
dYdX chain is an open-source application specific blockchain software that can power a decentralized perpetuals exchange. This standalone blockchain software is open-sourced by dYdX Trading Inc. (“dYdX”) and is based on the Cosmos SDK and CometBFT proof-of-stake consensus protocol. dYdX Chain is fully decentralized end-to-end, including its consensus mechanism, order-book, matching engine and front end.
## About dYdX

_dYdX does not control any aspects of any public deployments of dYdX chain. Any use of dYdX Chain is subject to the [v4 Terms of Use](https://dydx.exchange/v4-terms). You can read more about v4 software in our blog post [here](https://dydx.exchange/blog/dydx-chain)._
dYdX Chain is an open-source application specific blockchain software that can power a decentralized perpetuals exchange. This standalone blockchain software is open-sourced by dYdX Trading Inc. (“dYdX”) and is based on the Cosmos SDK and CometBFT proof-of-stake consensus protocol. dYdX Chain is fully decentralized end-to-end, including its consensus mechanism, order-book, matching engine and front end.

## A Note on Networks
dYdX does not control any aspects of any public deployments of dYdX Chain. Any use of dYdX Chain is subject to the [v4 Terms of Use](https://dydx.exchange/v4-terms). You can read more about v4 software in our blog post [here](https://dydx.exchange/blog/dydx-chain).

**Note:** Parameters included in code examples throughout this documentation are for the dYdX Chain Testnet. These parameters need to be updated to access any specific deployment of the dYdX Chain. In each relevant code snippet, please see the comments to pull the relevant parameters to access an applicable mainnet deployment of the dYdX chain, such as the following deployment:
## A Note on Network Examples
Parameters included in code examples throughout this documentation are for the dYdX Chain Testnet. These parameters need to be updated to access any specific deployment of the dYdX Chain. In each relevant code snippet, please see the comments to pull the relevant parameters to access an applicable mainnet deployment of the dYdX Chain, such as the following deployment:

| Name of Provider | URL | Status Page |
| ------------------------ | -------- | --------- |
Expand Down
8 changes: 4 additions & 4 deletions pages/infrastructure_providers-network/faucet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pip install v4-client-py
import { FaucetClient } from "@dydxprotocol/v4-client-js";

const client = new FaucetClient(FaucetApiHost.TESTNET);
const address = /* your dYdX chain address */;
const address = /* your dYdX Chain address */;
const faucetResponse = await client?.fill(address, 0, 2000);
```
</Tab>
Expand All @@ -38,7 +38,7 @@ from v4_client_py import FaucetClient
client = FaucetClient(
host=FAUCET_API_HOST_TESTNET,
)
address = /* your dYdX chain address */
address = /* your dYdX Chain address */
faucet_response = client.fill(address, 0, 2000)
```
</Tab>
Expand All @@ -52,7 +52,7 @@ faucet_response = client.fill(address, 0, 2000)
import { FaucetClient } from "@dydxprotocol/v4-client-js";

const client = new FaucetClient(FaucetApiHost.TESTNET);
const address = /* your dYdX chain address */;
const address = /* your dYdX Chain address */;
const faucetResponse = await client?.fill_native(address);
```
</Tab>
Expand All @@ -63,7 +63,7 @@ from v4_client_py import FaucetClient
client = FaucetClient(
host=FAUCET_API_HOST_TESTNET,
)
address = /* your dYdX chain address */
address = /* your dYdX Chain address */
faucet_response = client.fill_native(address)
```
</Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set Up a Full Node
Installing and running a full node allows your system to participate in a dYdX chain network.
Installing and running a full node allows your system to participate in a dYdX Chain network.

> Code snippets on this page use example values. Replace them with your own. See the [Network Configuration](../infrastructure_providers-network/network_constants.mdx) section of the documentation for network constants and other resources you need to configure a full node.
Expand Down Expand Up @@ -99,7 +99,7 @@ echo 'export PATH=$PATH:$HOME/.dydxprotocol/cosmovisor/genesis/bin' >> $HOME/.ba
### Step 6: Initialize your node
To initialize your node, provide the ID of the chain to which you want to connect and create a name for your node. The dYdX home directory is created in `$HOME/.dydxprotocol` by default. Replace the example values `dydx-mainnet-1` and `my-node` with your own and run the following command:
```bash
# Example for dYdX token holders on mainnet
# Example for DYDX token holders on mainnet
dydxprotocold init --chain-id=dydx-mainnet-1 my-node
```

Expand All @@ -113,7 +113,7 @@ A seed node acts as an address book and helps your node join the network. To upd
> Check the [Resources](https://docs.dydx.exchange/network/resources#seed-nodes) page for an up-to-date list of seed nodes for the network to which you want to connect.
```bash
# Example for dYdX token holders on mainnet
# Example for DYDX token holders on mainnet
SEED_NODES=("[email protected]:23856",
"[email protected]:23856",
"f04a77b92d0d86725cdb2d6b7a7eb0eda8c27089@dydx-mainnet-seed.bwarelabs.com:36656",
Expand Down Expand Up @@ -243,7 +243,7 @@ sudo journalctl -u dydxprotocold -f
```
If your system service `dydxprotocold` is running, the preceding command streams updates from your node to your command line. Press `Ctrl + C` to stop viewing updates.

Finally, confirm that your full node is properly synchronized by comparing its current block to the dYdX chain:
Finally, confirm that your full node is properly synchronized by comparing its current block to the dYdX Chain:
- To find the network's current block, see the **Block Height** of your network with a block explorer, such as [mintscan.io](https://www.mintscan.io/dydx).
- To find your full node's height, query your node with the following command:
```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run a Full Node
Running a full node allows your system to participate in a dYdX chain network. The recommended settings and best practices on this page help ensure your node stays healthy and up to date with the network.
Running a full node allows your system to participate in a dYdX Chain network. The recommended settings and best practices on this page help ensure your node stays healthy and up to date with the network.

> Code snippets on this page use example values. Replace them with your own. See the [Network Configuration](../infrastructure_providers-network/network_constants.mdx) section of the documentation for network constants and other resources you need to configure a full node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See [Governance -> Voting](../../users-governance/voting.md)

## Upgrades

Releases for the dYdX chain will use [semantic versioning](https://semver.org/). See [here](./types_of_upgrades.md) for details.
Releases for the dYdX Chain will use [semantic versioning](https://semver.org/). See [here](./types_of_upgrades.md) for details.

### ⚒️ Cosmovisor Users

Expand Down
2 changes: 1 addition & 1 deletion pages/introduction-getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Depositing on dYdX Chain**

1. Connect your preferred Ethereum wallet to the dYdX Chain deployment of your choice (e.g. the dYdX Operations Services Ltd. deployment [dydx.trade](https://dydx.trade)). _Support for Cosmos native wallets such as Keplr and Leap coming soon_.
2. Deposit USDC to your DYDX chain address. The default onboarding path uses Circle's Cross Chain Transfer Protocol (CCTP) on Noble Chain. You can deposit USDC from many origination chains. Read more [here](https://dydx.exchange/blog/cctp).
2. Deposit USDC to your dYdX Chain address. The default onboarding path uses Circle's Cross Chain Transfer Protocol (CCTP) on Noble Chain. You can deposit USDC from many origination chains. Read more [here](https://dydx.exchange/blog/cctp).

## User Journeys

Expand Down
Loading

1 comment on commit 8a4109a

@vercel
Copy link

@vercel vercel bot commented on 8a4109a Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must have Developer access to commit code to dYdX Trading on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

Please sign in to comment.