# Finance and Lookup

Crypto prices, IP and email lookups, and your credit balance

These endpoints use the same API key and balance as the other SilentAPI services. Send lookup values in the JSON body, and send your API key in the `Authorization` header. Do not put API keys or lookup values in a URL.

| Endpoint | Method | Price |
| --- | --- | --- |
| `/v1/silentapi/crypto-price` | POST or GET | 0.005 credits, or 0.003 credits for a cached price |
| `/v1/silentapi/ip-lookup` | POST | 0.004 credits |
| `/v1/silentapi/email-lookup` | POST | 0.004 credits |
| `/v1/silentapi/balance` | GET | Free |

## Crypto Price

Crypto Price returns the latest spot price of a trading pair from a major exchange.

```
curl https://api.silentapi.com/v1/silentapi/crypto-price \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"crypto":"BTC"}'
```

You can also send the symbol as a query parameter in a GET request:

```
curl "https://api.silentapi.com/v1/silentapi/crypto-price?crypto=ETH_USDC" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

| Field | Type | Meaning |
| --- | --- | --- |
| crypto | string | Required. A symbol such as `BTC`, or a pair such as `ETH_USDC` or `ETH-USD`. A symbol with no quote currency is priced in `USDT`. Each side has 1 to 20 letters or digits. |

Example response:

```
{
  "status": "ok",
  "price": 91250.42,
  "platform": "Binance",
  "source": "api",
  "cost": 0.005
}
```

| Field | Type | Meaning |
| --- | --- | --- |
| price | number | Last price of the pair, in the quote currency |
| platform | string | Exchange that gave the price |
| source | string | `api` for a new price, or `cache` for a price fetched in the last 60 seconds |
| cost | number | Credits charged for the call |

Prices stay in the cache for 60 seconds, and a cached price costs 0.003 credits. A missing symbol returns HTTP `400`, and a pair that no exchange lists returns HTTP `404` with the cost set to 0.

## IP Lookup

IP Lookup returns the network, location, and risk signals of an IPv4 or IPv6 address.

```
curl https://api.silentapi.com/v1/silentapi/ip-lookup \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"ip":"9.9.9.9"}'
```

Each call costs 0.004 credits. IP data updates daily. The response does not include history fields or the complete network range.

Answers are stored for up to 24 hours without account details, and the price is the same either way. Send `"cache": false` to get a fresh answer that is never stored.

Example response:

```
{
  "status": "ok",
  "9.9.9.9": {
    "network": {
      "asn": "AS64500",
      "as_name": "Example Network",
      "organisation": "Example Network",
      "isp": "Example Network",
      "type": "hosting"
    },
    "location": {
      "continent": "North America",
      "continent_code": "NA",
      "country": "United States",
      "country_code": "US",
      "region": "Example Region",
      "city": "Example City",
      "latitude": 40.7,
      "longitude": -74.0
    },
    "detections": {
      "proxy": false,
      "vpn": false,
      "tor": false,
      "hosting": true,
      "cloud": false,
      "risk": 40
    }
  },
  "cost": 0.004
}
```

`hosting` is true for data center and hosting addresses. `cloud` is true when the address is in the published address ranges of a public cloud provider. Cloud addresses also count as hosting.

Some values can be unknown:

| Case | Response |
| --- | --- |
| Unknown location or network value | The field is absent |
| Unknown ASN | The `asn` field is absent |
| Reserved IP address | The address field contains `{"ip":"127.0.0.1","type":"reserved"}` |

## Email Lookup

Email Lookup checks if an email address can receive mail and if it uses a disposable email service.

```
curl https://api.silentapi.com/v1/silentapi/email-lookup \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"email":"example@example.com"}'
```

Each call costs 0.004 credits. Email lists update daily. The lookup checks the email format, the domain, its mail servers, and known disposable domains, but it does not prove that a mailbox exists.

Answers are stored for up to 24 hours without account details, and the price is the same either way. Send `"cache": false` to get a fresh answer that is never stored.

Example response:

```
{
  "status": "ok",
  "example@example.com": {
    "valid": true,
    "detections": { "disposable": false }
  },
  "cost": 0.004
}
```

## Balance

Balance returns the credits left on your account. The call is free. `/v1/silentapi/credits` is the same endpoint.

```
curl https://api.silentapi.com/v1/silentapi/balance \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Example response:

```
{
  "status": "ok",
  "credits": 1250.5
}
```

Source: https://silentapi.com/docs/lookup
