Dynamic subscriptions on server events

Welcome to the float hell. This is why you should never use floats in non-scientific applications :wink: Especially when inter-operating between different languages.

I would suggest that you should send string to the backend, so instead of:

    <%= for market_id <- @market_ids do %>
      <button type="button" class="btn btn-default" drab-click="subscribe_market(<%= market_id %>)"><%= market_id %></button>
    <% end %>

do:

    <%= for market_id <- @market_ids do %>
      <button type="button" class="btn btn-default" drab-click="subscribe_market('<%= market_id %>')"><%= market_id %></button>
    <% end %>

Or multiple it by 10000000 and use integer.

That would save you a lot of sleepless nights :wink:

But the only real solution is to not to use floats. Never ever.