d-e-s-o / apca

A crate for interacting with the Alpaca API at alpaca.markets.
GNU General Public License v3.0
147 stars 40 forks source link

Proposal: Use a dedicated data type for stock symbols instead of String #54

Open vultix opened 1 year ago

vultix commented 1 year ago

Proposal: Use a stack-allocated dedicated Symbol type such as stock-symbol.

Benefits:

vultix commented 1 year ago

I'd be willing to make a pull request if this is the way we want to go

d-e-s-o commented 1 year ago

Thanks for bringing this up. Yeah, it probably makes sense to introduce such a type. But I'd suggest we define it ourselves instead of relying on a third-party crate such as stock-symbol. Could probably be as simple as a wrapper around [7; c_char] or something like that. Feel free to propose an implementation or prototype something.