Module: BudaApi
- Includes:
- Errors
- Defined in:
- lib/buda_api.rb,
lib/buda_api/client.rb,
lib/buda_api/errors.rb,
lib/buda_api/logger.rb,
lib/buda_api/models.rb,
lib/buda_api/version.rb,
lib/buda_api/constants.rb,
lib/buda_api/public_client.rb,
lib/buda_api/ai/risk_manager.rb,
lib/buda_api/ai/anomaly_detector.rb,
lib/buda_api/ai/trading_assistant.rb,
lib/buda_api/authenticated_client.rb,
lib/buda_api/ai/natural_language_trader.rb
Overview
BudaApi is the main module for the Buda.com API Ruby SDK
This SDK provides comprehensive access to the Buda.com cryptocurrency exchange API with built-in error handling, debugging capabilities, and extensive examples.
Defined Under Namespace
Modules: AI, Constants, Errors, Models Classes: AuthenticatedClient, Client, Configuration, Error, Logger, PublicClient
Constant Summary collapse
- VERSION =
"1.0.1"
Class Attribute Summary collapse
-
.configuration ⇒ Configuration
Get current configuration.
Class Method Summary collapse
-
.ai_available? ⇒ Boolean
Check if AI features are available.
-
.authenticated_client(api_key:, api_secret:, **options) ⇒ AuthenticatedClient
Convenience method to create an authenticated client.
-
.configure {|Configuration| ... } ⇒ Object
Configure the SDK.
-
.natural_language_trader(client) ⇒ AI::NaturalLanguageTrader
Convenience method to create a natural language trader.
-
.public_client(options = {}) ⇒ PublicClient
Convenience method to create a public client.
-
.trading_assistant(client, llm_provider: :openai) ⇒ AI::TradingAssistant
Convenience method to create an AI-enhanced trading assistant.
Class Attribute Details
.configuration ⇒ Configuration
Get current configuration
74 75 76 |
# File 'lib/buda_api.rb', line 74 def configuration @configuration end |
Class Method Details
.ai_available? ⇒ Boolean
Check if AI features are available
96 97 98 |
# File 'lib/buda_api.rb', line 96 def self.ai_available? defined?(RubyLLM) && defined?(BudaApi::AI) end |
.authenticated_client(api_key:, api_secret:, **options) ⇒ AuthenticatedClient
Convenience method to create an authenticated client
90 91 92 |
# File 'lib/buda_api.rb', line 90 def self.authenticated_client(api_key:, api_secret:, **) AuthenticatedClient.new(api_key: api_key, api_secret: api_secret, **) end |
.configure {|Configuration| ... } ⇒ Object
Configure the SDK
67 68 69 70 |
# File 'lib/buda_api.rb', line 67 def self.configure self.configuration ||= Configuration.new yield(configuration) end |
.natural_language_trader(client) ⇒ AI::NaturalLanguageTrader
Convenience method to create a natural language trader
113 114 115 116 117 |
# File 'lib/buda_api.rb', line 113 def self.natural_language_trader(client) raise Error, "AI features not available. Install ruby_llm gem." unless ai_available? AI::NaturalLanguageTrader.new(client) end |
.public_client(options = {}) ⇒ PublicClient
Convenience method to create a public client
81 82 83 |
# File 'lib/buda_api.rb', line 81 def self.public_client( = {}) PublicClient.new() end |
.trading_assistant(client, llm_provider: :openai) ⇒ AI::TradingAssistant
Convenience method to create an AI-enhanced trading assistant
104 105 106 107 108 |
# File 'lib/buda_api.rb', line 104 def self.trading_assistant(client, llm_provider: :openai) raise Error, "AI features not available. Install ruby_llm gem." unless ai_available? AI::TradingAssistant.new(client, llm_provider: llm_provider) end |