// For development and testing
let config = EmberConfig::new()
.with_environment(Environment::Testnet);
// For production use
let config = EmberConfig::new()
.with_environment(Environment::Production);
API Key Types
Different API key types provide different levels of access:
// Read-only access
let config = EmberConfig::new()
.with_key_type(ApiKeyType::ReadOnly);
// Full trading access
let config = EmberConfig::new()
.with_key_type(ApiKeyType::Trading);
// Administrative access
let config = EmberConfig::new()
.with_key_type(ApiKeyType::Admin);
Rate Limiting
Configure rate limits to match your API tier:
let rate_limit = RateLimitConfig {
requests_per_minute: 100,
burst_limit: 20,
websocket_connections: 5,
};
let config = EmberConfig::new()
.with_rate_limit(rate_limit);