davsclaus opened a new pull request, #30957:
URL: https://github.com/apache/camel/pull/30957

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   Rewrites 8 texts of `camel-xchange`: the component description, 5 endpoint 
options (`name`, `service`, `method`,
   `currency`, `currencyPair`) and 2 headers (`Currency`, `CurrencyPair`). The 
old texts were one to four words ("The
   currency", "The method to execute") and did not say which method reads a 
value, nor that the header and the message
   body come before the option. The old component description said the 
component trades on exchanges, but it only has
   methods that read market data, metadata and account data. The `name` text 
now says which XChange class is loaded and
   that `camel-xchange` brings only the Binance module.
   
   Sources: the Camel code of the component (configuration, producers, 
converters) and XChange 6.0.0 (`ExchangeFactory`,
   `CurrencyPair`, `Currency`).
   
   ### Found, not changed
   
   - The component has no option for the API key and secret key: 
`XChangeComponent` creates the exchange with
     `ExchangeFactory.createExchange(Class)`, which sets no keys, so the 
`account` service methods cannot authenticate
     unless an `XChange` is put on the component from code (`putXChange` is 
package-private; only the tests use it).
   - The doc page (section "Authentication") says that the keys can be stored 
in `~/.ssh/<exchange>-secret.keys`. The
     component code does not read this file; only the tests call 
`AuthUtils.setApiAndSecretKey`.
   - The doc page says Camel can "query historical data, place market orders 
and much more", and speaks of a "consistent
     interface for trading". The component has no trade service and no method 
for historical data.
   - The `Currency` and `CurrencyPair` header names have no `Camel` prefix (see 
`design/headers.adoc`).
   - The `currency` option is typed `Currency` (and the configurer converts the 
text with the type converter), while the
     `currencyPair` option is a `String` that is parsed with `new 
CurrencyPair(String)` for each message. So an unknown
     currency fails in the `currency` option but not in the `currencyPair` 
option.
   - `XChangeConfiguration.setCurrency(String)` is not used by the generated 
configurer.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (8 texts).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to