# Sniperoo API Documentation

Your one-stop shop for all things Sniperoo.







<b>QUICK GUIDE</b>

To get started, you first need to create an API token. You can get it by visiting the [Sniperoo website](https://sniperoo.app) and navigating to the "API Access" section.

After you get the token you need to add it to the <i>Authorization</i> Header Paramater and prefix it with 'Bearer '. 

For example: 'Bearer df98f0967874a85b6dd657c796147daa'



 If you have any questions or need help, please reach out on discord or email.



 Quick Links:

🔗 Main Platform: [https://sniperoo.app/](https://sniperoo.app/)

📄 Docs: [https://docs.sniperoo.app/](https://docs.sniperoo.app/)

💬 Discord: [https://discord.gg/sniperoo](https://discord.gg/sniperoo)

📢 Telegram: [https://t.me/sniperoo_app](https://t.me/sniperoo_app) 

 #️⃣ ️⃣Twitter / X [https://twitter.com/sniperoo_app](https://twitter.com/sniperoo_app)





Version: 1.0.0
License: UNLICENSED

## Servers

Sniperoo API Server
```
https://api.sniperoo.app
```

## Security

### bearer

Enter the API token with the `Bearer: ` prefix, e.g. "Bearer abcde12345"

Type: http
Scheme: bearer
Bearer Format: API token

## Download OpenAPI description

[Sniperoo API Documentation](https://api-docs.sniperoo.app/_bundle/swagger.yaml)

## API-Keys

API Key management.

### Generate new API key

 - [POST /api-keys](https://api-docs.sniperoo.app/swagger/api-keys/paths/~1api-keys/post.md): Create a new API key.

Generates a new API key for programmatic access to the trading platform.
The key will be associated with your account and have the permissions you specify.

### List all API keys

 - [GET /api-keys](https://api-docs.sniperoo.app/swagger/api-keys/paths/~1api-keys/get.md): List all API keys.

Retrieves all API keys associated with your account.
Note that API key secrets are not included in this response.

### Revoke API key

 - [DELETE /api-keys](https://api-docs.sniperoo.app/swagger/api-keys/paths/~1api-keys/delete.md): Delete an API key.

Permanently deletes an API key, immediately revoking access for any
services using this key. This action cannot be undone.

## Managed Accounts

Managed accounts for API partners.

Endpoints for creating and managing sub-accounts on behalf of end users.
Only available to users with API partner status.

### Create managed account

 - [POST /managed-accounts](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts/post.md): Create a new managed account.

Creates a new managed account for one of your end users. Each managed account
can have its own wallets and execute trades independently. You must be an API partner
to use this endpoint.

### List managed accounts

 - [GET /managed-accounts](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts/get.md): List all managed accounts.

Retrieves all managed accounts that belong to your API partner account.

### Get managed account by external user ID

 - [GET /managed-accounts/{externalUserId}](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts~1%7Bexternaluserid%7D/get.md): Get a specific managed account.

Retrieves details for a specific managed account by external user ID.

### Update managed account

 - [PATCH /managed-accounts/{externalUserId}](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts~1%7Bexternaluserid%7D/patch.md): Update a managed account.

Updates the name, active status, or metadata for a managed account.

### Delete managed account

 - [DELETE /managed-accounts/{externalUserId}](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts~1%7Bexternaluserid%7D/delete.md): Delete a managed account.

Permanently deletes a managed account. Any wallets associated with this account
will have their managedAccountExternalId set to null (transferred back to owner).
Open positions will have their managedAccountExternalId set to null as well.

### Buy token for multiple managed accounts - WORK IN PROGRESS

 - [POST /managed-accounts/buy-token-for-managed-accounts](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts~1buy-token-for-managed-accounts/post.md): Buy a Solana token for multiple managed accounts.

Executes token purchases for multiple managed accounts in a single request.
Each account can specify its own purchase amount and auto-sell settings.

### Export intermediary wallet private key

 - [GET /managed-accounts/export-intermediary-wallet](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1managed-accounts~1export-intermediary-wallet/get.md): Export an intermediary wallet's private key.

Retrieves the base58-encoded private key for a specific intermediary wallet address.
The wallet must belong to the authenticated user.
IMPORTANT: Keep your private key secure and never share it.

### Get wallets by managed account

 - [GET /user/wallets/{managedAccountExternalId}](https://api-docs.sniperoo.app/swagger/managed-accounts/paths/~1user~1wallets~1%7Bmanagedaccountexternalid%7D/get.md): Get wallets by managed account external ID.

Retrieves all wallets associated with a specific managed account,
including current SOL balance for each wallet.

## Solana Trading

### Buy a Solana token / Create a buy order

 - [POST /trading/buy-token](https://api-docs.sniperoo.app/swagger/solana-trading/paths/~1trading~1buy-token/post.md): Buy a Solana token / Create a buy order.

You can either execute an immediate purchase or create a buy order that will be executed automatically when conditions are met.
Creation of a buy order is done by setting the autoBuy field in the request.

### Execute a buy order before its conditions are met

 - [POST /trading/execute-order](https://api-docs.sniperoo.app/swagger/solana-trading/paths/~1trading~1execute-order/post.md): Execute a buy order before its conditions are met.

This endpoint executes a previously created buy order before its conditions are met.

### Sell a percentage of tokens from a specific position

 - [POST /trading/sell-percentage-from-position](https://api-docs.sniperoo.app/swagger/solana-trading/paths/~1trading~1sell-percentage-from-position/post.md): Sell a percentage of tokens from a specific position.

Sells a defined percentage (1-100%) of tokens from a specified trading position.
If 100% is specified, uses the sell-all method for efficiency.

## Tokens

### Get risk assessment for a token

 - [GET /solana/risk](https://api-docs.sniperoo.app/swagger/tokens/paths/~1solana~1risk/get.md)

## Wallet

Wallet management

### Get your wallets

 - [GET /user/wallets](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1wallets/get.md): Get all of your Solana wallets.

Retrieves the list of all wallets associated with your account,
including current SOL balance for each wallet.

### Create new wallet

 - [POST /user/wallets](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1wallets/post.md): Create a new wallet.

Creates a new Solana wallet for your account with a specified name.
The wallet will be generated with a new keypair.

### Export wallet private key

 - [GET /user/wallets/{address}/export](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1wallets~1%7Baddress%7D~1export/get.md): Export a wallet's private key.

Retrieves the private key for a specific wallet address.
IMPORTANT: Keep your private key secure and never share it.

### Import existing wallet

 - [POST /user/wallets/import](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1wallets~1import/post.md): Import an existing wallet.

Adds an existing Solana wallet to your account using its private key.

### Transfer SOL between wallets

 - [POST /user/transfer](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1transfer/post.md): Transfer SOL between wallets.

Sends SOL from one of your wallets to any Solana address.

### Rename a wallet

 - [POST /user/wallets/update-name](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1wallets~1update-name/post.md): Rename a wallet by its address. Optionally scope the lookup to a specific managed account. The main wallet cannot be renamed. Duplicate names within the same managed account are not allowed.

### Hide a wallet

 - [POST /user/hide-wallet](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1hide-wallet/post.md): Hide a wallet from the user's wallet list. The wallet is not deleted and can be unhidden later.

### Unhide a wallet

 - [POST /user/unhide-wallet](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1unhide-wallet/post.md): Unhide a previously hidden wallet, making it visible again in the user's wallet list.

### Check wallet SOL balance

 - [GET /user/balance-for-wallet](https://api-docs.sniperoo.app/swagger/wallet/paths/~1user~1balance-for-wallet/get.md): Get the SOL balance for a specific wallet.

Retrieves the current SOL balance for the specified wallet address.

## User

User account management

### Update trading preferences

 - [POST /user/update-user-settings](https://api-docs.sniperoo.app/swagger/user/paths/~1user~1update-user-settings/post.md): Update user trading settings.

Updates your personal trading settings including buy/sell slippage, jito tip, *etc.,
Only supplied fields will be updated.

## Orders

### Get all orders, even the ones that are not active

 - [GET /orders/orders-and-conditions](https://api-docs.sniperoo.app/swagger/orders/paths/~1orders~1orders-and-conditions/get.md): Get all orders, even the ones that are not active.

Includes token extra info for each order.

### Cancel an order

 - [POST /orders/cancel-order](https://api-docs.sniperoo.app/swagger/orders/paths/~1orders~1cancel-order/post.md): Cancel an order.

This will cancel an order.

## Positions

Trading position management

### Get filtered trading positions

 - [GET /positions](https://api-docs.sniperoo.app/swagger/positions/paths/~1positions/get.md): Get filtered trading positions ordered by newest first.

Retrieves trading positions filtered by wallet address and/or open/closed status,
with pagination. Includes transactions, token information, and current values.

### Get all trading positions

 - [GET /positions/all](https://api-docs.sniperoo.app/swagger/positions/paths/~1positions~1all/get.md): Get all your trading positions.

Retrieves a list of all your token trading positions including transactions,
token information, and current values. Includes both open and closed positions.

### Get single trading position

 - [GET /positions/{positionId}](https://api-docs.sniperoo.app/swagger/positions/paths/~1positions~1%7Bpositionid%7D/get.md): Get a specific trading position.

Retrieves detailed information about a single trading position including
its transaction history, token information, and current values.

